开发者

Reloading modernizr after ajax

I have part of a page being dynamically refreshed via the jQuery load() method, but its not looking so hot in IE. Short of rewriting the mark-up to suite ie, I would like to reload modernizr after the ajax and have it re-work its magic to the newly inserted content. Is this possible? hopefully via the 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 load the 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 the modernizr loaded in the head as such <script src="/js/modernizr-1.5.min.js"></script>

So my goal is to have modernizr re-bedazzle the contents of '#swap-content' when it gets reloaded via load().


I had the same problem with html5shiv. This should do the trick: http://jdbartlett.github.com/innershiv/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜