Writing a plugin for [top-secret] (not really :P) and I decided that one best course of action would be "IF" there is a definitive way to add function to ... maybe the $.ajax's complete func so that after a change is made, every new call to .load will call this implemented function automajically upon completion.
That's the idea in a nutshell, to break it down more (and no there isn't really code, because everything i have coded is working fine, this part i'm not sure where to start, duh1) If a user clicks on a link and a view-partial is loaded into an element, i log it and make a change to data field. What i'd like to do, is have this happen on every instance of .load without having to make the coder add it to his/her code in the .load complete func.
Not sure how I cn make this make more since, although i don't "think" I did too bad. Who kows i might find the answer myself as i'm looking through the jQuery library now. If I do I'll post it, if not, hopefully someone has done something like this with "jQuery" before?
If i understood your question correctly, you could use ajaxComplete()
, that gets called whenever an AJAX request finishes.
Edit to show use and work-ability
$(document).ajaxComplete(function(){ alert('complete'); });