javascript - Detect ul list content change jQuery -


we have unordered list id #some-list. in our backbone implementation, when data returned, list entries rendered , appended list , list displayed.

we want detect when such change completed using jquery. used $(#some-list).ready() , $(#some-list).load(), looks not working.

what ways capture such change? shed lights here?

well didn't post code it's hard see guess fail.
in general trigger custom event on ajax callback (you use ajax content , appending list right?).

for example:

loaddata(){   // invoke ajax request   var def = $.get(...);   def.then(function(result){     // $(#ul) append(result) ...       // trigger custom event       $(document).trigger('listrendred');   }); } 

now on different place or script can listen it:

$(document).on('listrendred', function(e){ // ever... }) 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -