How can I do something like:
$("#some_div").dialog("doSomething");
And what that method should do is to add an extra icon in the titlebar
EDIT 1: I’ve tried this solution: the method gets called but I can’t access the dialog object (maybe I’m doing something wrong)
Ok, this is what I did:
This solution by Langdon, along with this one by Kevin B gave me the answer on how to resolve my problem
UPDATE 2014-01-03
TIL about $.widget(), so here is another implementation of the same thing