You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Overlay/Expose load external page into div Created Jul 10, 2009

This thread is solved

Views: 4005     Replies: 3     Last reply Dec 28, 2010  
You must login first before you can use this feature

Ticallian

Posts: 11

Registered:
Jul 10, 2009

Overlay/Expose load external page into div

Posted: Jul 10, 2009

I'm trying to get the Overlay and Expose tools to work together when a web page is loaded into the Overlay div.

I know there are demos on how to do each separately, but not together.
Below is one of many attempts i've made.


$("a[rel]").overlay(function() {
	expose: { color: '#000', opacity: 0.6 };
	var wrap = this.getContent().find("div.wrap");
	wrap.load(this.getTrigger().attr("href"));
});

I'm sure its simple, i've just been stumped on it too long now.
Anyone know how?

beren

Posts: 1

Registered:
Jul 10, 2009

» Overlay/Expose load external page into div

Posted: Jul 10, 2009

Reply to: Overlay/Expose load external page into div, from Ticallian
The default function passed to overlay is really the 'onBeforeLoad' callback. Use the standard options method to set the callback manually. Otherwise, it uses the same code:

$("a[rel]").overlay(
    {
      onBeforeLoad: function() { 
        // grab wrapper element inside content 
        var wrap = this.getContent().find("div.wrap");
        wrap.load(
          this.getTrigger().attr("href")
        ); 
      }, 
      expose: '#CDE2A1',
      api: true
    }

Ticallian

Posts: 11

Registered:
Jul 10, 2009

» » Overlay/Expose load external page into div

Posted: Jul 11, 2009

Reply to: » Overlay/Expose load external page into div, from beren
Worked a treat.
Thanks for the help!