In JavaScript is it possible to add to a callback function instead of overwriting it?
<p>I don't know if I'm saying this right, so I'll just ask by explaining with an example. </p>

<p>Let's say I've written a jQuery plugin with an <code>onShowEdit</code> callback.</p>

<p>I later use my plugin and add a bunch of other default functions/methods to the event:</p>

<pre><code>$('.editable_module:not(.custom)').editable({
   onShowEdit: function(el){
      initRequired();
      $(':radio, :checkbox', el).prettyCheckboxes();
      initDatePickers();
      initChosen();
      initMaskedInputs();
      $('.dynamic_box.tabs').dynamicBoxTabs();
      $('.trigger_dynamic_box').triggerDynamicBox('true');
   }
});
</code></pre>

<p>So now I have a basic/default element (<code>.editable_module</code>) that calls the plugin and has some methods/functions that are going to be used in all instances. </p>

<p>My question comes when I have a need to add something to this for a 'one time' kind of deal (I need to add some behavior to this callback/event but not something that is used normally). Is it possible to extend or add to this callback/event without overwriting it? I mean, I know I can go in and do this:</p>

<pre><code>$('#new_selector').editable({
   onShowEdit: function(el){
      initRequired();
      $(':radio, :checkbox', el).prettyCheckboxes();
      initDatePickers();
      initChosen();
      initMaskedInputs();
      $('.dynamic_box.tabs').dynamicBoxTabs();
      $('.trigger_dynamic_box').triggerDynamicBox('true');

      //ADD SOME NEW STUFF HERE
   }
});
</code></pre>

<p>But is that really my only option?</p>

<p>Thanks in advance for any input/suggestions.</p>
