The jquery popup I created using the jquery show function, fades away in few seconds which is not intended.
I want the popup to stay…
How can i tell jquery to do so?
heres is my code,
jQuery(document).ready(function(){
jQuery('#popuup_div.popup_msg').hide();
$(a.xyz).click(function(e)
{
var height = jQuery('#popuup_div').height();
var width = jQuery('#popuup_div').width();
leftVal=e.pageX-(width/1.5)+"px";
topVal=e.pageY-(height/13)+"px";
jQuery('#popuup_div').css({left:leftVal,top:topVal}).show();
});
jQuery('#image').click(function(e)
{
jQuery('#popuup_div').fadeOut('fast');
});
});
html
<div id='popuup_div' class='popup_msg'>
<div id='image'>
gets the image
</div>
<br>
some message
</div>
css:
.popup_msg{
position:absolute;
z-index:100;
width:700px;
height:250px;
text-align:justify;
color:Black;
font: 14px Verdana, Arial, Helvetica, sans-serif;
background-color:yellow;
}
This code:
is the code the fades away the div. Based on the code you provided, the pop up div won’t fade away unless you click on the image div. Are you sure the div always fades away even if you don’t click anything? There is nothing else in your posted code that would cause your pop up to fade.