You can proxy the method:

$("#dialog").dialog({
  resizeStop: function() {
    alert('old function');
  }
});
var oldFun = $("#dialog").dialog("option", "resizeStop");
$("#dialog").dialog("option", "resizeStop", function() {
  alert('new function');
  oldFun();
});

or you can leave it as is and use .bind(). The event type is all lowercase,
'resizestop', not camelCase like the option name. And it's triggered on the
dialog element:

$("#dialog").dialog({
  resizeStop: function() {
    alert('option');
  }
});
$("#dialog").parents(".ui-dialog").bind("resizestop", function() {
  alert('bind');
});

- Richard

On Wed, Mar 25, 2009 at 4:19 PM, Nikola <[email protected]> wrote:

>
> Is it possible to append Dialog callbacks rather than overwrite them?
> Specifically, in some circumstances, I want to append an additional
> function to the already existing Dialog open and resizeStop
> callbacks.  Respecifying the callback in the following manner, though,
> replaces the callback rather than appending to it:
>
> $("#dialog").dialog("option", "resizeStop", function(){ eg() };
>
> How can I append to the callback rather than replace it?  Is it
> possible to store the original callbak in a var and then append my own
> function to the var?  I've been stumped on this one for a few days.
>
> Thanks..
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to