javascript - Making a position of an object fixed -
i trying make #two
fixed when scrolled between:
($(this).scrolltop() > 1310 && $(this).scrolltop() <9000 )
this have tried:
$(window).scroll(function () { if ($(this).scrolltop() > 1310 && $(this).scrolltop() <9000 ) { $('#two').css({positon:'fixed',bottom:'100'}); } else { $('#two').css({positon:'absolute'}); } });
but seems not working.. help?
try {position:'fixed', bottom:'100px'}
. if close you'll see {positon:'fixed',bottom:'100'}
contains typos.
Comments
Post a Comment