<p onclick="closeoverlay()">close!</p>
thanks!
<p onclick="closeoverlay()">close!</p>
var o = $("a[rel]").overlay({api: true});
// click on paragraph of class pclose closes overlay
$("p.pclose").click(function () {
o.close();
});
<p class="pclose">close!</p>
<p class="close">close overlay</p>
$("JQUERY SELECTOR").overlay({
close: "p.close"
});
<div class="overlay">
<p class="close">close it!</p>
</div>
<div class="close">
<!-- close button, must be styled with css as usual -->
</div>
<div class="overlay">
<p class="close">close it!</p>
</div>
$("a[rel]").overlay({
// paragraph of class "myclass" closes overlay
close: "p.myclass"
});
<div class="overlay">
<p class="myclass">close it!</p>
</div>
<div class="overlay">
<div id="Content">
Here you have some content with links
which have already be bound and work.
like : <a href="" anTtribue="">a link which is suppose to close the overlay</a>
</div>
</div>
<div class="overlay">
<div id="Content">
The closing link must have the close class:
<a class="close"
href="whatever">a link which is supposed to close the overlay</a>
</div>
</div>
$(function() {
overlayAPI = $("a[rel]").overlay({api: true});
});
overlayAPI.close();
$(function() {
//"#"+dest give me the ID of the current overlay
overlayAPI = $("#"+dest).overlay({api: true});
});
,
closeAll : function(){
$.each(instances, function() {
this.close();
});
},
overlayAPI = $("a[rel]").overlay({
closeAll : function(){
$.each(instances, function(){
this.close();
});
}, api: true});
overlayAPI = $("#"+dest).overlay({api: true});
overlayAPI.closeAll();
Posts: 2
Registered:
Sep 3, 2010
<a onclick="$('.close').click()">Close this overlay...</a>
// taken from the jqueryTools example
$(function() {
// if the function argument is given to overlay,
// it is assumed to be the onBeforeLoad event listener
$("a[rel]").overlay({
expose: 'darkred',
effect: 'apple',
onBeforeLoad: function() {
// grab wrapper element inside content
var wrap = this.getOverlay().find("div.wrap");
var self = this;
// load the page specified in the trigger
// + init events in its callback
wrap.load(this.getTrigger().attr("href"), function(){
$('.close', this).click(function(){self.close()});
}); // end wrap.load
} // end overly.onBeforeLoad
} // end overlay config
}); // end document.ready