I have a basic modal popup
here is the code
Code: Select all
<script>
$(function() {
//$('#preview').click(function(){
$( "#dialog-modal" ).dialog({
height: 500,width: 500,
modal: true
});
});
//});
</script>
as you see I have this commented out $('#preview').click(function(){
and what I need is to make the popup appear when a link is clicked not when the page is loaded
here is my link
<a href="#" id="preview">Preview</a>
whats going on is instead of hiding the content of the popup its showing it at the bottom of the page but when that line is commented out it hides it but popup shows when page is loaded again.
I am not sure what to do since I don't use a lot of jquery.
any help would be great