How to open a popup on click a button using jquery Development

To open pop-up on click a button or “a” tag use just below code and change css as per your requirements


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/blitzer/jquery-ui.css"
 rel="stylesheet" type="text/css" />
<script type="text/javascript">
 $(function () {
 $("#popup").dialog({
 modal: true,
 autoOpen: false,
 title: "jQuery PopUp",
 width: 300,
 height: 150
 });
 $("#adlive").click(function () {
 $('#popup').dialog('open');
 });
 });
</script>
<input type="button" id="adlive" value="Show Popup" />
<div id="popup" style="display: none" align = "center">
 This is a jQuery popup.
<form>
<input type="text" name="name" placeholder="Enter your name"/>
<input type="submit" name="submit">
</form>
</div> 

Do you like my posts? Please let me know by dropping your valuable comments, also if you have any questions, please let’s know.

Thanks