The whole document is given below in which i included the stylesheet and jQuery script files too.Copy the code into your webform and run or directly open it in your browser.
<html> <head> <style type="text/css"> .popupBody * { MARGIN-RIGHT: 15px; } .popupBody { OVERFLOW: auto; HEIGHT: 500px; MARGIN-LEFT: 7%; WIDTH: 92.8%; } .popupTitle { BACKGROUND-COLOR: #e13e43; border-top-left-radius: 5px; border-top-right-radius: 5px; } .popupTitle H2 { HEIGHT: 40px; COLOR: white; PADDING-BOTTOM: 5px; PADDING-TOP: 15px; PADDING-LEFT: 20px; MARGIN: 0px; } #lean_overlay { HEIGHT: 100%; BACKGROUND: #000; POSITION: fixed; LEFT: 0px; FILTER: alpha(opacity=30); Z-INDEX: 100; DISPLAY: none; TOP: 0px; WIDTH: 100%; opacity: 0.3; } .popupClose { RIGHT: 12px; POSITION: absolute; Z-INDEX: 2; TOP: 12px; text-decoration: none; color: white; } .popupContent { BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; DISPLAY: none; TOP: 10%; width: 35%; height: 45%; } .popupWindow { WORD-WRAP: break-word; FONT-SIZE: 13px; HEIGHT: auto; FONT-FAMILY: san serif; BACKGROUND: white; POSITION: absolute; MARGIN-LEFT: 28%; Z-INDEX: 11000; LETTER-SPACING: 1px; WIDTH: 40%; -moz-box-shadow: 0 0px 4px rgba(0, 0, 0, 0.7); -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.7); box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.7); border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } </style> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { /****** Close popup ******/ $(document).on('click', '.popupClose', function (e) { e.preventDefault(); $('.popupWindow').css('display', 'none').removeClass('popupWindow'); $("#lean_overlay").remove(); }); /******Trigger popup ********/ $('.popupTrigger').click(function () { var dialog = $(this).next('.popupContent'); $('.popupClose').css('display', 'block'); dialog.css('display', 'block').addClass('popupWindow'); var overlay = $("<div id='lean_overlay'> </div>").css('display', 'block').addClass('popupClose'); $("body").append(overlay); return false; }); }); </script> </head> <body> <div class="popup"> <a class="popupTrigger" href="#">Click here to see popup</a> <!-- This is the model popup content --> <div class="popupContent"> <!-- Titel for popup goes in <h2> tag ----> <div class="popupTitle"> <h2>Simple pop up using jquery </h2> </div> <!-- Body of popup goes into <p> tag --> <div class="popupBody"> <a class="popupClose" href="">Close</a> <p>Now you are able to create a simple and beautiful pop-up window.You can try not only plain text in it but also design according to our taste and could even create a form with any control you could use in your webpages.Hope you understand this and try to apply it in your applications whereever you feel it required.Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p> </div> </div> </div> </body>