tags:

views:

1372

answers:

2

im trying to make a jquery overlay to load an external page can anyone help??

i think im having two versions of jquery conflicting with each other im 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 im adding this "http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js">

for the overlay and it doesnt seem to work...im not sure if its syyling or my code is wrong or the two dont get along together...

does anyone have a simple overlay with externaml page?

thanks

A: 

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); })
});
adardesign
+1  A: 

Hi,

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

Professional2Hire