title: jquery chaining generic callback function
body: <p>Often times I come across situations where I want to execute a jQuery function or initialize a jQuery plugin like jQuery datatables and would like to have code execute after the function has finished. jQuery functions such as hide or fadein or other transformation functions take an optional callback parameter to accomplish this. However there are other jQuery functions which just return the 'this' object to allow for chaining. I would like to know if there is a way using chaining or some other method to execute some kind of generic function which takes a callback after whatever jQuery function I call finishes. </p>
  
  <p>Something like:</p>
  
  <pre><code>$("#element").datatable().executeCallback(myCallbackFunction);
  </code></pre>