• Resolved David Borrink

    (@davidborrink)


    I have a specific link on a post which is somehow receiving the following in the URL…

    class="fancybox image" and rel="gallery"

    …when there is nothing like that in the post editing window.

    Here is the HTML from the post window in text mode…

    <h3><a href="http://www.giftedguru.com/underachiever-on-track/" target="_blank" rel="noopener noreferrer">Can We Get a High School Underachiever on Track? Reader Q & A </a>from Gifted Guru</h3>

    …but here is the HTML output from the inspector…

    <h3><a href="http://www.giftedguru.com/underachiever-on-track/" target="_blank" class="fancybox image" rel="gallery">Can We Get a High School Underachiever on Track? Reader Q & A </a>"from Gifted Guru"<h3>

    I turned off Easy Fancybox and the link acts normal. I cannot figure out why this particular URL in the post is getting this FancyBox class. In the FancyBox settings page, the plugin is only supposed to activate for Images and PDFs.

    • This topic was modified 4 years, 11 months ago by David Borrink.
    • This topic was modified 4 years, 11 months ago by David Borrink.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, thanks for reporting. I see what is going wrong: there is a .gif in that URL which makes fancybox think it’s an image URL.

    To work around it, you have two options:

    A. Do you use GIFs that open up in a light box at all on your site? If not, then you can go to Settings > Media and remove the .gif from the Autodetect field in the Images section.

    B. Otherwise, you could give this particular link a class="nolightbox" manually to prevent FancyBox from binding itself to it.

    I’ll work on a fix to prevent this from happening in the next release 🙂

    Thread Starter David Borrink

    (@davidborrink)

    Oh, I see. It’s the “gif” in “giftedguru.com”. Ahhhh, that makes sense. That’s an unexpected quirk. We kept looking and looking for a clue and wouldn’t have considered that. LOL

    I went in to the settings and removed .gif from the Autodetect field and that took care of it.

    We really don’t use GIFs on the site so that’s a good fix for now.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘FancyBox is adding an unneeded class to a link’ is closed to new replies.