Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #797831

    LFSdesign
    Participant

    I have 4 flip boxes on the site, 2 have button links which are internal to the same page but 2 link to external websites. How can I make the 2 external button links open in a new tab rather than take them away from the website? A href using target “blank” syntax doesn’t work, only seems to work with a standard http:// or https:// web address.

    Many thanks

    #798121

    Thai
    Moderator

    Hi There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #799110

    LFSdesign
    Participant
    This reply has been marked as private.
    #799533

    Paul R
    Moderator

    Hi,

    Thank you for providing your url.

    You can add class open-new-window in the class field of your card element.

    http://screencast.com/t/ypMPC5f1

    Then add this in custom > javascript

    
    jQuery(function($) {
         $('.open-new-window .x-face-button').attr('target','_blank');
    });
    

    Hope that helps.

    #804823

    LFSdesign
    Participant

    Hi,

    How do you seperate classes? I have flip-3d in the class at the moment. I have tried using a comma but it doesn’t seem to recognise this new class you gave me with a comma between them.

    Thanks

    #805336

    Thai
    Moderator

    Hi There,

    Please try with this code:

    jQuery(function($) {
         $('.open-new-window .x-face-button, .your-new-class .x-face-button').attr('target','_blank');
    });

    Hope it helps 🙂

    #806158

    LFSdesign
    Participant

    Thank you. I tried this but it still isn’t working unfortunately.

    I removed flip-3d class to see if it would work if there was only one class but it still didn’t work so I put flip-3d back as it was needed to correct other problems with the cards element.

    #806279

    Rupok
    Member

    Hi there,

    Thanks for updating. It seems you didn’t add the extra classes to your cards. In that case just use the following :

    jQuery(function($) {
         $('.x-card-outer .x-face-button').attr('target','_blank');
    });

    Hope this help.

    Cheers!