Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open html page within fancybox

Ive looked for some examples online but i couldn't fund any.

how can i upload a new html within fancybox?

 $('#Create').click(function() {
 $.fancybox({

 What should be the content over here?
 (lets say i want to load stackoverflow.com)

 });
like image 235
Itzik984 Avatar asked Jan 26 '12 15:01

Itzik984


1 Answers

The documentation is right on the site, you can use an iframe:

$("#iframe").fancybox({
    'width'         : '75%',
    'height'        : '75%',
    'autoScale'     : false,
    'transitionIn'  : 'none',
    'transitionOut' : 'none',
    'type'          : 'iframe'
});

HTML

<a href="http://www.example?iframe">This goes to iframe</a>

or

<a id="iframe" href="http://www.example">This goes to iframe</a>

You can find all that info here: http://fancybox.net/howto

like image 153
Andres Ilich Avatar answered Sep 22 '22 23:09

Andres Ilich