javascript - jQuery Function to Toggle Overflow Not working on Microsoft Edge -
i have written jquery function toggle between overflow-y: hidden, and, overflow-y: auto upon pressing button. works great on chrome, opera , firefox on desktops. reason microsoft edge not work rather strange since rest of browsers worked without problem. , explanation wonderful!
$(".pro-toggle").click(function(){ var hidden = $('body').css('overflow'); if(hidden == 'hidden'){ $("body").css("overflow-y","auto"); } else { $("body").css("overflow","hidden"); } });
<button class="navbar-toggle collapsed pro-toggle pull-left" data-toggle="collapse"> <span class="icon-bar top-bar"></span> <span class="icon-bar middle-bar"></span> <span class="icon-bar bottom-bar"></span> </button>
please find support scroll bar styling in edge browser
it's hard know specifically, without official documentation, clear indications, or official word dev team, seems unlikely based on previous comments purpose , design goals of edge.
here's why that:
the properties you're referring added ie8 extensions css 2.1 specification. these properties non-standard , considered illegal in circles. (there other non-standard variations, though it's unclear whether they're supported in ms edge.)
what clear these particular properties may not formally supported in edge, presumably because proprietary extensions.
this seems unlikely change, since 1 of major design points of ms edge set aside legacy compatibility in favor of standards , cross platform interoperability. (and, given major functionality changes made ie11 without changing major or minor version number, it's entirely feasible support non-standard properties may disappear after given update.)
the fact these properties work in build you're using may deliberate design decision or may side effect fact edge based on fork of trident engine, 1 many lines of legacy code have been removed.
again, without official confirmation or announcement, speculation based on experience , previous team behavior. mileage may vary.
Comments
Post a Comment