Dofs
Dofs

Reputation: 19197

Open an external page in a jQuery Colorbox

How can I open a jQuery colorbox with an external site loaded. I have tried:

jQuery(document).ready(function(){
jQuery.colorbox({ href:"http://www.google.com", iframe: true });
});

But with no success. I have not been able to find an example of this from either the colorbox-site or SO.

Upvotes: 1

Views: 13649

Answers (1)

sushil bharwani
sushil bharwani

Reputation: 30187

Do you want the colorbox to open on the load of your page.

If yes You need to write.

jQuery.fn.colorbox instead of just jQuery.colorbox.

also specifcy width and height elements for your colorbox iframe.

http://colorpowered.com/colorbox/core/example1/index.html is having an example in Other Content Types section

Upvotes: 2

Related Questions