I am writting a web application in which I want to load the JQuery over lay programatically on onClick
event of a div. here is div html code
<div class="button_left"
onClick="manageAlert('/abc/com')"><span>Click here</span></div>
and here is the overlay div
<div id="ad_alert_wizard">This is test</div>
and JavaScript code is as follows.
function manageAlert(url)
{
if(url=="")
{
$("#ad_alert_wizard").overlay({
// custom top position
top: 260,
// some mask tweaks suitable for facebox-looking dialogs
mask: {
// you might also consider a "transparent" color for the mask
color: '#000000',
// load mask a little faster
loadSpeed: 200,
// very transparent
opacity: 0.5
},
// disable this for modal dialog-type of overlays
closeOnClick: false,
//load it immediately after construction
load: true
});
}
else
{
location.href=url;
}
}
now the problem is this, when I click on the div the overlay loads first time properly... and after closing it, when I click again on the div it don't load untill I refresh the page. What might be the error.. I am using JQuery Tools for overlay.