2012-01-26 4 views
5

Ive ha cercato alcuni esempi online ma non ho potuto finanziarli.Apri la pagina html all'interno di fancybox

come posso caricare un nuovo html all'interno di fancybox?

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

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

}); 

risposta

11

La documentazione è proprio sul sito, è possibile utilizzare un 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> 

Puoi trovare tutte queste informazioni qui: http://fancybox.net/howto