Quantcast
Channel: Jquery, not changing css top value - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Jquery, not changing css top value

$
0
0

So the problem im having is changing my #scroll top:value with the pixel (px) extension.

#container { height:100px; overflow:hidden;}#scroll { position:relative; top:0px;}<div id="container"><p><a id="up">Up</a></p><div id="scroll">up down blah</div></div>$(function(){  $("#up").hover(function(){    var topVal = $( 0 +"px");    $("#scroll").css("top", topVal-10 +"px");  });

Viewing all articles
Browse latest Browse all 3

Trending Articles