Demo of dialog box with close button to hide messages using JQuery

This opens on button click & use close button to remove this.



HTML

<button id="b1">Open Dialog Box</button>
<div id="my_dialog" title="plus2net  dialog">
  <p>This opens on button click & use close button to remove this.</p>
</div>

JQuery

<script>
$(document).ready(function() {
$(function() {
$( "#my_dialog" ).dialog({
		autoOpen: false,
buttons: {
    "Close ": function() {
     $( this ).dialog( "close" );
   }
  }
});
});
$("#b1").click(function(){
$( "#my_dialog" ).dialog( "open" );
})
})
</script>