We help IT Professionals succeed at work.

Jquery Help, Body on load

sahanz
sahanz used Ask the Experts™
on
I'm using color box, light box plugin. http://colorpowered.com/colorbox/

This is the script.

$(document).ready(function(){
                        //Examples of how to assign the ColorBox event to elements
                        
                        $(".example7").colorbox({width:"80%", height:"80%", iframe:true, overlayClose: false});
                        
});


so heres the html

<a class='example7' href="http://google.com">Outside Webpage (Iframe)</a>


So when click the link the popup appear, so what I want is, I want to open the popup on the page load. How can I do that ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Multitechnician
Top Expert 2014
Commented:
Try :


$(document).ready(function(){
                        //Examples of how to assign the ColorBox event to elements
                        
                        $(".example7").colorbox({width:"80%", height:"80%", iframe:true, overlayClose: false}).click();
                        
});

Open in new window

Try this:
 

$(document).ready(function(){
                        //Examples of how to assign the ColorBox event to elements
                        
                        $fn.colorbox({width:"80%", height:"80%", iframe:true, overlayClose: false});
                        
});

Open in new window

Try this:
$(".example7").click(function(){
    $fn.colorbox({width:"80%", height:"80%", iframe:true, overlayClose: false});
});

Open in new window

Author

Commented:
Thanks, is there anyway to make them work without the existing text link ?