Jump to content

Possible to open a gallery in a new tab?

Go to solution Solved by tuanphan,

Recommended Posts

Oh for sure, thank you.

The index is here:
https://www.therealsamkirk.com

And the gallery that breaks links when you try to go BACK from it is here:
https://www.therealsamkirk.com/project-quicksilver/

To reproduce:
- access the "work" page
- click on the 3rd tile (project quicksilver)
- use the browser functions to navigate back to the index
- try to click on any project, doesn't work.

NOTE: If you reload the page it will load the project you clicked on

Pretty weird, but that's why I want to just force that project to open in a new tab.

Link to comment

Try adding this code to Website Tools (under Not Linked) > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
$('.item a').attr('target','_blank');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Thank you for the response! Does this specifically address the buggy navigation?

Unfortunately I would need to upgrade to a more expensive plan to allow for code injection in the footer.

Is there any alternative route that would only require custom CSS?

I am still interested in a solution that just forces the password protected project to open in a new window as that would solve the issue as well.

Link to comment
  • Solution
On 1/24/2024 at 12:45 AM, Porkue said:

Thank you for the response! Does this specifically address the buggy navigation?

Unfortunately I would need to upgrade to a more expensive plan to allow for code injection in the footer.

Is there any alternative route that would only require custom CSS?

I am still interested in a solution that just forces the password protected project to open in a new window as that would solve the issue as well.

You try edit Site Footer > Add a block > Choose Markdown > Then paste the code

or try disable Ajax Loading in Design

Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.