|
jquery, scrolling
Hi!
on a jquery trigger, i want to add more margin-left pixels to how it it is currenty.
to lets say i have a div, and it is 350px left, and on the jquery trigger, i want it to animate a further pixel,
the trigger is scrolling, so as i scroll, the div moves further along.
$(window).scroll(function(){
("#div").animate({ marginLeft: "+1px"}, 1);
});
...does not work, i guessed it.
$(window).scroll(function(){
alert("scrolled");
});
..does work, (just proving that the trigger works).
Any help would be appreciated!
Last edited by wylie233; 12-03-2012 at 05:38 PM..
|