Recent

Author Topic: Android Chrome: window.scrollBy does nothing  (Read 149 times)

epergola

  • Full Member
  • ***
  • Posts: 152
Android Chrome: window.scrollBy does nothing
« on: May 23, 2020, 12:05:10 am »
Hi. I have this piece of code in my html

Code: Pascal  [Select][+][-]
  1. function lr(){
  2.   a=document.getElementById("pghor");
  3.   var w = $("#div").width();
  4.   if(a.innerText==="->>>>"){
  5.     a.innerText="<<<<-";
  6.     window.scrollBy(w-50,0);
  7.     //$("html,body").scrollLeft(w-50);
  8.   }else{
  9.     a.innerText="->>>>";
  10.     window.scrollBy(-(w-50),0);
  11.   }
  12. }
  13.  

It works perfectly on desktop, but not in Samsung Android Chrome.
If anybody can help, i attach the html (< 300 lines).
Thank you

 

TinyPortal © 2005-2018