WordPress.org

Ready to get started?Download WordPress

Forums

Easy FancyBox
More than one call fancybox iframe on the same page (2 posts)

  1. tomslider
    Member
    Posted 2 years ago #

    Hi,

    On my word press, i use one link with class="fancybox-iframe" in a widget.(the widget is in the header). For this link i use {width:600,height:400}

    In one page on my website, i want to write another link with class="fancybox-iframe {width:1000,height:500}".

    But this FancyBox link seems to keep the other dimensions (ie {width:600,height:400} of the iframe link in the widget.

    If i use the other iframe class (ie fancybox iframe {width:1000,height:500} without dash, the FancyBox takes the good dimensions...

    Is there a way, to fix this?

    http://wordpress.org/extend/plugins/easy-fancybox/

  2. RavanH
    Member
    Plugin Author

    Posted 2 years ago #

    This is known behaviour of the use of metadata in FancyBox. The data (between curly braces) given to the first link, is applied to all others with that same class. I fear there is no way to prevent this from happening.

    Your work-around by using a different class 'fancybox' and then adding ' iframe' as second class, telling FancyBox that it's iframe mode we need, is the only way to work around it.

    You could ofcourse switch these cases and use 'fancybox iframe' (without hyphen) for the first link in your head widget but using metadata for this class 'fancybox' might affect all other image and inline content links on that same page... You'll have to test this.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic