Hi All,
I have an overlay that is implemented using Malsup BlockUI, with a "close" button, however it won't close! - here's the details...
I have a DIV that I use as an overlay:
<div id="mp" style="display: none; cursor: default">
<p>blah blah blah:</p>
<ul>
<li>A</li>
<li>B</li>
</ul>
<div>
<span class="divbutton greenbutton mp_no" style="margin-right: 1em">not now thanks</span>
<span class="divbutton greenbutton" style="margin-right: 1em">
<asp:HyperLink ID="hypView" runat="server" style="text-decoration: none" NavigateUrl="~/mp.aspx">blah</asp:HyperLink>
</span>
</div>
</div>
displayed using:
$.blockUI({ message: $("#mp").html() });
it has a cancel button (see above):
...
<span class="divbutton greenbutton mp_no" style="margin-right: 1em">not now thanks</span>
...
which closes the overlay by means of :
$('.mp_no').click(function() {
alert("close overlay");
$.unblockUI();
return false;
});
however like I say, this simply refuses to close the overlay. I've used this same technique over and over again but this time something must be wrong. I just can't spot it!
Moreover... if I place a button elsewhere on the page (and outside of the overlay DIV):
<span class="divbutton greenbutton mp_no" style="margin-right: 1em">not now thanks</span>
this will fire the click event, and is exactly the same "button" markup!?!
Any ideas?