Maybe something like below (not tested and off the top of my head)
var currentObject = null; $(function(){ $('.invited').css('cursor','pointer').click(function(){ var url = 'myserverpage.lasso?task=event&event=1&volunteer='; url += $(this).attr('id'); currentObject = this; $('#invitation').jqm({ ajax: url, onhide: function(){ hash.o.remove(); doSomething(); } }).jqmShow(); }); }); doSomething = function(){ $(currentObject ).empty().append('<img/>'); currentObject = null; } That should point you in the right direction. -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com