Tutorial :Browser support



Question:

I need to make this function work everywhere, except IE6-7

$(function(){      window.scrollTo(0,300);  })  

Please help.


Solution:1

You could link in broswer detect and then do something like:

$(function() {     if (!($.browser.msie() && $.browser.version.number() < 8)) {        window.scrollTo(0,300);     }  }  

I suppose the better question is why do you need this? Read more about object detection instead.


Solution:2

This is the construct that you're after I think:

if (!(jQuery.browser.msie)) { window.scrollTo(0,300); }


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »