confirmation box jquery ui
I need to fire the jquery ui confirmation box when link is pressed... heres my code so far...
$(function() {
$(".logout").bind('click', function() {
$(".logout").dialog({
bgiframe: true,
resizable: false,
height:140,
modal: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Logout and return to login page': function() {
$(this).dialog('close');
return true;
},
Cancel: function() {
$(this).dialog('close');
return false;
}
}
});
});
});
For some reason the tutorials only display on page load, I want this to fire when .logout is pressed. Any ideas?