jquery - scrollTop not working on IE11 -
jquery - scrollTop not working on IE11 -
you're right, there ton of similar queries on stackoverflow, after reading/analyzing @ to the lowest degree 20, haven't found right answer. verified script contained
$('body,html').animate({scrolltop:$(this).offset().top},800); instead of
$("body").animate({scrolltop:$(this).offset().top},800); as specified here: scrolltop doesn't work on firefox , ie? no avail. i've tried several other modifications stopped working on browsers.
while script works flawlessly across else i've checked (chrome, firefox, opera), not work expected on windows 8.1 / ie11. should hide #featuring_wrap, show #div_x , scroll it. except scroll. sidebars taller, doesn't scroll div.
i read in post here jquery v1.x <= ie8 , v2.x >= ie10. culprit? hope not - tried using v2.1.1 else on page stopped working (slider, other hide/show functionality).
here 2 versions of script. first using. there no difference when utilize sec version.
$(document).ready(function(){ $("#featured-product-nav a").click(function(){ $("#featuring_wrap").hide(); var id = $(this).attr('id'); id = id.split('_'); $("#divs_container > div").removeclass("active"); $("#divs_container > #div_"+id[1]).addclass("active"); $("#divs_container > div:not(.active)").slideup(); $("#divs_container > div.active").slidetoggle(function(){ $('body,html #divs_container > #div_"+id[1]').animate({ scrolltop: $("#div_"+id[1]).offset().top }, 800); }); }); homecoming false }); $(document).ready(function(){ $("#featured-product-nav a").click(function(){ $("#featuring_wrap").hide(); var id = $(this).attr('id'); id = id.split('_'); $("#divs_container div").removeclass("active"); $("#divs_container #div_"+id[1]).addclass("active"); $("#divs_container div:not(.active)").slideup(); if($("#divs_container #div_"+id[1]).hasclass("open")){ $("#divs_container #div_"+id[1]).removeclass("open").slideup(); } else{ $("#divs_container .open").slideup().removeclass("open"); $("#divs_container #div_"+id[1]).addclass("open").slidedown(); $('body,html #divs_container #div_"+id[1]').animate({ scrolltop: $("#div_"+id[1]).offset().top }, 800); } }); }); live code here: http://www.healthfirst.com/dental-waste/sharps-recovery-dental/index.html
any suggestions?
jquery internet-explorer-11 scrolltop
Comments
Post a Comment