Put all your your jQuery functions in a wrapping one, so that you can easily re-run them; and don’t forget to call it in your first initialization as well
$(document).ready(function() {
function reloadAll() {
…
}
reloadAll();
}
I like your method a lot. Very clever. My question is can we access the reloadAll() function defined inside $(document).ready from outside it? Imagine I wanna use the ‘success’ option of an ajaxSubmitButton. How does that work?
I’ve just noticed that in your first post you say “some newly added components to the page will remain irresponsive”, if you use jQuery events, you may not need what I’ve said above. Instead, you may use “live”. Example
Thank you so much! .live() method is the easiest way to go for me. I actually ended up using the .on() method as .live() is deprecated now. But great advice!