The below code works fine for only the first click event. However for any subsequent click nothing happens. I tested this on firefox, ie7 but still the same. Am I missing something?
<script type="text/javascript">
$(document).ready(function() {
//$('#dialog').dialog();
$('#dialog_link').click(function() {
$('#dialog').dialog();
return false;
});
});
</script>
</head><body>
<div id="dialog" title="Dialog Title" style="display:none"> Some text</div>
<p id="dialog_link">Open Dialog</p>
</body></html>
May be helpful... :)
Try this
And in HTML
Better to use .hide() instead of .remove(). With .remove() it returns undefined if you have pressed the link once, then close the modal and if you press the modal link again, it returns undefined with .remove.
With .hide() it doesnt and it works like a breeze. Ty for the snippet in the first hand!
If you want to put some page in the dialog then you can use these
HTML:
Try adding this line before your dialog line.
This method worked for me. It seems that the "close" command messes up the dialog opening again with only the .dialog() .
Using your code as an example, it would go in like this (note that you may need to add more to your code for it to make sense):
try
there is a open arg in the last part