Hello moleculezz just look at the following example

TOOLKIT = {
that : this,
 refreshHandlers : function() {
$('#container t...@id=edit]').each(function() {
$(this).unbind('click', showEditDialog);
 $(this).bind('click', function(){
showEditDialog.call($(this).attr('id'));
});
});
 $('#container t...@id=delete]').each(function() {
$(this).unbind('click', showDeleteConfirmDialog);
 $(this).bind('click', function(){
showDeleteConfirmDialog.call($(this).attr('id'));
});
});
},
 showEditDialog: function(row_id){
$('#edit').dialog({
//
//
//
beforeclose: function(){
that.refreshHandlers()
}
});
 // and do something with the current row :p
var old = $('t...@id="' + row_id + '"')[SOME_FIELD].text();
},
 showDeleteConfirmDialog: function(){
$('#edit').dialog({
//
//
//
beforeclose: function(){
that.refreshHandlers()
}
});
 // and do something with the current row :p
var old = $('t...@id="' + row_id + '"')[SOME_FIELD].text();
// add some stuff to the dialog's GUI etc....
}
}


// And at last just initiate instance :)
$(document).ready(function() {
       TOOLKIT.refreashHandlers();
})

With best,
Sultan Imanhodjaev

--

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


Reply via email to