I have a list of images and a delete button attached with each image.
in click of delete button i have opened a popup for confirmation using twitter bootstrap modal with help of jquery event handler.
Now when i click on the confirmation button in the popup, how can i return a value to caller function (delete button), so that i can remove the image from dom?
Twitter Bootstrap Modal: http://twitter.github.com/bootstrap/javascript.html#modals
Following is the code i have used to call model dialog box:
$('.close-btn').click(function(e) {
e.preventDefault();
$('#myModal').modal('show');
//$(this).parents('li').remove();
});
I am not sure if this is the correct way of writing this, but it worked for me: