thelieselotte Posted August 4, 2020 Share Posted August 4, 2020 Site URL: https://www.thelieselotte.com/home-2 Hello everyone, I am looking for a custom code that allows me to open images in a summary block to open in a new window/tab. I looked at every entry in this forum and asked Squarespace support, but none of the solutions worked. I have a summary block at the top of my homepage displaying different art prints of mine. It looks like a gallery block, but it is the summary wall. I like the masonry layout of this one and would like to keep it. The problem: My art prints are available in my Etsy store and every image links to the product page on Etsy. But it doesn't open in a new tab, which makes people leave my site. Not ideal. Could someone help me out and let me know what code to use? Squarespace 7.0 Foster Templatehttps://www.thelieselotte.com/home-2 Link to comment
tuanphan Posted August 4, 2020 Share Posted August 4, 2020 Add to Page Settings > Advanced > Header <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('a.summary-thumbnail-container.sqs-gallery-image-container').attr('target','_blank'); }); </script> Disable Ajax Loading if the code doesn't work. https://support.squarespace.com/hc/en-us/articles/115000253288-Ajax-loading tina2 and Liza 1 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
thelieselotte Posted August 5, 2020 Author Share Posted August 5, 2020 11 hours ago, tuanphan said: Add to Page Settings > Advanced > Header <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('a.summary-thumbnail-container.sqs-gallery-image-container').attr('target','_blank'); }); </script> Disable Ajax Loading if the code doesn't work. https://support.squarespace.com/hc/en-us/articles/115000253288-Ajax-loading THANK YOU! That works! And it works with or without Ajax Loading. Liza 1 Link to comment
ekspohz Posted October 19, 2020 Share Posted October 19, 2020 On 8/4/2020 at 3:40 PM, tuanphan said: Add to Page Settings > Advanced > Header <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $('a.summary-thumbnail-container.sqs-gallery-image-container').attr('target','_blank'); }); </script> Disable Ajax Loading if the code doesn't work. https://support.squarespace.com/hc/en-us/articles/115000253288-Ajax-loading @tuanphan Is there a similar solution for the Flatiron template: https://www.museandcompany.com/#/crunchy-roll-headquarters/ Opening a gallery image into a new window (last image in this gallery). Target=blank does not work on these. Link to comment
tuanphan Posted November 21, 2020 Share Posted November 21, 2020 On 10/20/2020 at 3:25 AM, ekspohz said: @tuanphan Is there a similar solution for the Flatiron template: https://www.museandcompany.com/#/crunchy-roll-headquarters/ Opening a gallery image into a new window (last image in this gallery). Target=blank does not work on these. Hi. Have you found the solution yet? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment