Javascript Tabber Reload
I've got some dynamic content inside a tabber (http://www.barelyfitz.com/projects/tabber/).
All works fine, but I want to reload the div which contains the tabber. When I do this, using jQuery AJAX, the data updates, but the tabs are no longer formed. Do I have to reload the javascript elements of the page, and if so how do I开发者_开发知识库 got about doing this?
Thanks! :)
Sparkles*
Your AJAX function is probably replacing the contents of the div with new elements (so they lose any initialization that you've done).
In your AJAX callback, just re-initialize tabber. From glancing at their web-page it looks like you just need to call the function tabberAutomatic(tabberOptions);
I think something like this will do the trick:
$("#myDiv").load("/my/remote/data.json", function(){
tabberAutomatic();
});
精彩评论