Modernizer reboot after ajax

I have a part of the page dynamically updated by the jQuery load () method, but it does not look so hot in IE. Except for rewriting the markup on the package, that is, I would like to reload modernizr after ajax and redo its magic to newly inserted content. Is it possible? hope through load () callback somehow?

updated with my code I have my scripts.js loaded at the bottom of the page with the following: (using the jquery address plugin here to determine when to upload new content)

function ajaxLoad(){
  $.address.change(function(event) {    
    $("#swap-content").fadeOut('fast').load(event.value+' #swap-content', pageFunctions);
  };
};

function pageFunctions() {
  $("#swap-content").fadeIn('fast');
}


$(document).ready(function(){
  ajaxLoad();
});

and then I have modernism loaded into the head as such. <script src="/js/modernizr-1.5.min.js"></script>
Therefore, my goal is to upgrade the contents of "# swap-content" when it is reloaded via load ().

+3
1
+2

Source: https://habr.com/ru/post/1764607/


All Articles