jQuery Plugins

How to use iframes with prettyphoto?

0 261

To use iframe in prettyphoto you need to:

1. Create a link (a href=”#”).

2. Add the rel=”prettyPhoto” attribute “prettyPhoto” to it.

3. Change the href of your link so it points to the URL you want to open.

4. Then add “?iframe=true” as a parameters in your HREF so prettyPhoto knows to open the content in an iframe.

5. Then add the width and height as parameters in your HREF (&width=100&height=100) (Optional).
Note: that the dimensions can be percent based.

code example:

<a href="http://www.google.com?iframe=true&width=100%&height=100%" rel="prettyPhoto[iframes]" title="Google.com opened at 100%">Google.com</a>
<a href="https://www.programmercode.in?iframe=true&width=500&height=250" rel="prettyPhoto[iframes]">programmercode.in</a>
<a href="http://www.vining.in?iframe=true&width=400&height=200" rel="prettyPhoto[iframes]">vining.in</a>

About the author / 

codeadmin

Leave a reply

Your email address will not be published. Required fields are marked *

*