javascript - bgiframe with jquery browser -


here old jquery code using jquery 1.5 version. works

jquery.fn.showpagemask = function() {      var maskheight = $(document).height();      if ($.browser.msie && parseint($.browser.version) < 7) {          $('#pagemask').bgiframe();      }       $('#pagemask').css({ 'filter': "alpha(opacity=50)" });      $('#pagemask').css({ '-moz-opacity': "0.6" });      $('#pagemask').css({ '-khtml-opacity': "0.6" });      $('#pagemask').css({ 'opacity': "0.6" });      $('#pagemask').show();      $(window).resize(function() {          $('#pagemask').setfullwidth();      }); 

now updated jquery 1.9.1 , getting error $.browser

here instead of checking browser version , name, should check feature support. dont understand, how can check below scenario feature.. feature should detect?

if ($.browser.msie && parseint($.browser.version) < 7) {      $('#pagemask').bgiframe(); // why hell ie<7 }  

you have several options:

1) unless still need support ie6, can remove these 3 lines:

if ($.browser.msie && parseint($.browser.version) < 7) {      $('#pagemask').bgiframe();  }  

2) current version of plugin tests ie 6 , is, default, active if browser ie 6. uses useragent string identify ie 6.

so, can change this:

if ($.browser.msie && parseint($.browser.version) < 7) {      $('#pagemask').bgiframe();  }  

to this:

$('#pagemask').bgiframe();  

and, nothing browsers aren't ie 6.


3) if wanted use feature detection, need devise feature detection algorithm problem plug-in trying fix. if problem present, use plug-in. if problem not persent, don't need plug-in. don't quite understand problem plug-in trying fix i'm not sure how advise here.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -