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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -