How to make a simple modal popup for the following code.And on click on the background the modal popup should not disappear.
jQueryUI has a modal dialog plugin. It won't release control simply by clicking the background, as you requested: http://jqueryui.com/demos/dialog/#modal
Show Modal Box
--
$(".showModal").click(function(e){
e.preventDefault();
$("#modalContents").dialog({bgiframe: true, height: 140, modal: true});
});