javascript - Creating a popup on link click? -
hi trying create popup displayed when link clicked. code have problem dialog shown when page loads, rather when clicked.
<script type="text/javascript"> $(document).ready(function () { $("#opendialog").click(function () { $("#dialog").dialog({ modal: true, height: 250, width:200 }); }); }); </script> <a id="opendialog" href="#">click here open dialog</a> <div id="dialog" title="dialog title"> <p>dialog contents here</p> </div>
simply replace this:
<div id="dialog" style="display:none;" title="dialog title"> <p> dialog contents here</p> </div>
set
style='display:none'
Comments
Post a Comment