Change width of element with mouseover jquery

Posted by casben79 on Stack Overflow See other posts from Stack Overflow or by casben79
Published on 2010-05-13T05:47:59Z Indexed on 2010/05/13 5:54 UTC
Read the original article Hit count: 157

Filed under:

I am trying to create a thin line under a nav bar to follow the mouse but am having trouble getting e.page:X to set the width of the element.

Here is what I have:

$('#test').mousemove(function(){
var linewidth = e.pageX;
$("#line").width($linewidth);
                              })
})

Can anyone tell me why this is not setting the width of #line

© Stack Overflow or respective owner

Related posts about jQuery