Support » Plugin: Easy FancyBox » Images open a new tab anyway

  • Resolved Trebly

    (@trebly)


    Hi,

    Using this syntax :

    <a href="https://image.jpg" class="fancybox image" ><img class="" src="https://image.jpg" alt="" width="640" height="360"/></a>

    When this is integrated into a page a click have two effects :

    • Open a new tab with the image width=”640″ height=”360″
    • Open over the orginal tab, what is waited : the image into colorbox with suitable parameters defined into easy fancyBox

    The user has to close the opened tab before viewing the FancyBox, this is boring and stupid particularly on mobiles.
    I spent time to find what happens because it was into a more complex context so I have built a simple test of this (a page with just one photo on my site).

    What is the way to avoid that the image is opened into a new tab (so twice). This is the opposite to the purpose of FancyBox ?

    Best regards

    Trebly

Viewing 2 replies - 1 through 2 (of 2 total)
  • Trebly

    (@trebly)

    My search gave result some hours later.

    I have searched in concurrent treatments of “click” event (or focusin) on the “a” tag.
    I found one which by default when case was not trapped was launching the default treatment…
    The “fancybox” treatment, which was after, were then not filtered, they are now because of an added filter into the JQ function of the “a” click treatment :
    if ( the_elemt.hasClass('fancybox') == true){ return true;}

    So everything is OK now.

    Case is closed;

    Trebly

    • This reply was modified 1 year ago by Trebly.
    Plugin Author RavanH

    (@ravanh)

    Good to hear and thanks for sharing 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Images open a new tab anyway’ is closed to new replies.