-
AuthorPosts
-
February 16, 2016 at 4:51 am #797831
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
February 16, 2016 at 8:24 am #798121Hi 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.
February 16, 2016 at 9:00 pm #799110This reply has been marked as private.February 17, 2016 at 2:58 am #799533Hi,
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.
February 20, 2016 at 5:10 pm #804823Hi,
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
February 21, 2016 at 7:44 am #805336Hi 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 🙂
February 21, 2016 at 10:54 pm #806158Thank 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.
February 22, 2016 at 12:41 am #806279Hi 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!
-
AuthorPosts