Skip to content Skip to sidebar Skip to footer

Jquery Scrolltop - Cross Browser Compatibility Issues

Yesterday I had an issue with a JQuery scrolling script that worked in Chrome but not in IE and Firefox. I asked this query (JQuery scroll() / scrollTop() not working in IE or Fir

Solution 1:

scrollTop() will return value of only first matched element in set $('html,body'), that's why it no more works on chrome

I think your best bet would be to use:

var container = $(document.scrollingElement || "html");

Post a Comment for "Jquery Scrolltop - Cross Browser Compatibility Issues"