WordPress.org

Support

Support » Plugins and Hacks » Easy FancyBox » Support inline without disrupting normal a href URLs

Support inline without disrupting normal a href URLs

  • In Fancybox 1.3.5 that this plugin currently uses it seems that it’s not possible to use inline fancybox for showing inline HTML elements without disrupting the normal functionality of the link. Inline fancyboxing is available only when a link’s href is changed, which makes the link unusable for opening in a new tab, or for anyone with JavaScript disabled.

    The solution is to support a custom attribute, such as data-fancybox-href, as Fancybox 2 does. With those you leave the href as it is, so there is no loss of functionality. It can be almost added by changing line 108 of jquery.fancybox-1.3.5.js to:

    href = selectedOpts.orig.attr('data-fancybox-href') || selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;

    By default that file isn’t used, so to test it you need to remove .pack from line 424 of easy-fancybox-class.php. In my tests the above patch worked otherwise, but .fancybox-wrap was stuck with width: 20px for some reason, so unfortunately it’s not usable yet.

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

  • The topic ‘Support inline without disrupting normal a href URLs’ is closed to new replies.
Skip to toolbar