javascript - Merge two onLoad scripts into one -
i have 2 onload scripts
<body onload=" (function($){ $(document).ready(function(){ $(window).scroll(function() { if ( $(window).scrolltop() >= ($('body').height() - $(window).height()) ) { $(window).scrolltop(1); } else if ( $(window).scrolltop() == 0 ) { $(window).scrolltop($('body').height() - $(window).height() -1); } }); }); })( jquery );">
and
<body onload="window.scroll(0, 1500)">
i need them in same onload="" , still working. can me this? thank you!!
<body onload=" $(window).scroll(function() { if ( $(window).scrolltop() >= ($('body').height() - $(window).height()) ) $(window).scrolltop(1); else if ( $(window).scrolltop() == 0 ) $(window).scrolltop($('body').height() - $(window).height() -1); }); ">
Comments
Post a Comment