/ Published in: JavaScript
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
$(function(){
// jQuery UI Dialog
$('#dialog').dialog({
autoOpen: false,
width: 400,
modal: true,
resizable: false,
buttons: {
"Confirm": function() {
// submit the form that called the dialog :s
document.forms["vote_campaign_edit"].submit();
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
$('form#vote_campaign_edit').submit(function(){
$('#dialog').dialog('open');
return false;
});
$('form.formtastic.vote_shop').submit(function(){
$('#dialog').dialog('open');
return false;
})
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                