As the super-long title suggests, I'm needing something of a jQuery Document Ready equivalent that will work with dynamically-loaded content that's loaded via ajax in a jQuery Mobile accordion/collapsible.
We have a few things that WON'T work as well:
$(document).ready()
won't work because it's not technically the document that we're waiting to load.$('div#id').load()
doesn't seem to work.$('div#id').ready()
seems to run anytime the actual page is loaded, regardless of whether the collapsible content is run.This is kind of a shot in the dark, but anything you guys can help with, I'm grateful for :).
Thanks
Use .ajaxComplete()
$(document).ajaxComplete(function(e, xhr, settings){
});
If you want to do something when document has something new added then:
$(document).on('DOMNodeInserted', function(e) {
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With