2012-01-26 4 views
5

Ive a cherché quelques exemples en ligne mais je ne pouvais pas en financer. Comment puis-je télécharger un nouveau code HTML dans fancybox?Ouvrir la page html dans fancybox

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

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

}); 

Répondre

11

La documentation se trouve sur le site, vous pouvez utiliser une 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> 

Vous trouverez toutes ces informations ici: http://fancybox.net/howto

Questions connexes