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>
I had the same problem with html5shiv. This should do the trick: http://jdbartlett.github.com/innershiv/
精彩评论