I'm trying to make a jQuery overlay load an external page.
I think I'm having two versions of jquery conflicting with each other, as I'm using this for a drag and drop and it works fine:
src="js/jquery-1.3.2.min.js
js/jquery-ui-1.7.2.custom.min.js
Now when I add this:
http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js
for the overlay it doesn't seem to work. Does anyone have a simple overlay with external page?
But why you are not using Fancybox or more better colorbox here is the link
http://colorpowered.com/colorbox/
Colorbox is light have cool effect just give it a try, and you can theme it as it is css-based.
Thanks
HTML
<a id="selector" href="#">My event trigger</a>
<!-- put the the overlay below before closing </body> the end of the page -->
<div class="overlayOuter">
<div class="overlayInner">
<!-- external content to be loaded here -->
</div>
</div>
CSS
.overlayOuter{
background:#000;
opacity:0.7;
display:none;
height:100%;
left:0;
position:absolute;
top:0;
width:100%;
z-index:100001;
}
.overlayInner{
position:absolute;
top:40%;/*or whatever*/
left:40% /*or whatever*/
width:500px;
z-index:100001;
}
JS
$("a#selector").live("click", function(){
$(".overlayInner").load("externalPage.html",
// the following is the callback
function(){$(".overlayOuter").fadeIn(300); })
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With