Change width of element with mouseover jquery
- by casben79
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