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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -