jquery - basic modal
Posted: Tue May 21, 2013 8:50 am
hey this is first time in this forum I think maybe 2nd but my issue is easy to some.
I have a basic modal popup
here is the code
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
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