Jump to content

zaneliu

Member
  • Posts

    15
  • Joined

  • Last visited

Everything posted by zaneliu

  1. Hi Tuan, that's correct! I'd like to make that video a clickable link to an external tab.
  2. Hi Tuan, I'm facing a similar problem. I'd like to make the video on my front page into a clickable link that opens into a new tab. What's the best method you would go about this? Thanks! Also I'm on a business plan! zaneliu.com
  3. Hi, I'm currently using an Index page to link to a number of projects. I've used custom code injection from this resource (thank you Tuan) to link an image on index and a link in the footer to open an external website in a new tab. This function works as desired with Ajax Loading turned off, but ideally I'd like it to function with Ajax on as well. With Ajax Loading turned on, the original Index page shows a blank screen upon clicking the link (image below). The custom link function also stops working after running through the site a bit. Is there a way to avoid the blank screen or to ensure the link functions even with Ajax on? Thanks for your help! Source: zaneliu.com/work and click on the second image (Wayfinding on Ai Pin) for error Ajax breaking on link click: My Custom Code Injection: <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { // open image link new tab $('article.index-item a[href="/wayfinding-humane"]').attr('target','_blank'); // open footer link new tab $('a.index-nav-link[href="/wayfinding-humane"], .page-description a, div#collection-footer-6518953523d07e0831e2e9bd a').attr('target','_blank'); // Humane image $('article.index-item a[href="/wayfinding-humane"]').attr('href','https://michaelandzanes.website'); // Bottom link for Humane $('a.index-nav-link[href="/wayfinding-humane"]').attr('href','https://michaelandzanes.website'); }); </script>
  4. Thanks @tuanphan! That does get the page to load the links with Ajax. One additional question, I noticed that with Ajax on and the link opening in a separate tab, upon clicking either the Index image link or the links towards the bottom, it leaves the original tab in a blank state where it stalls on maintaining the original content. Do you know of any ways to maintain the original state? Thanks for all your help. This has been really fruitful learning already! Best!
  5. Resolved my own bug. For reference to everyone else, I was missing this line of code for opening links up top: $('a.index-nav-link[href="/wayfinding-humane"]').attr('target','_blank'); @tuanphan is there any way to get this function to work without killing Ajax loading? ——— Hi Tuan! Hope this thread is still alive. I've just been attempting some similar linking on my site. I've managed to get the Index image link to function as well as turning of Ajax. However, I have not been able to get this line of code to work for in-line links. Link to my site: https://zaneliu.com/wayfinding-humane I'm attempting to get the links at the bottom to correctly open an external URL in a new tab. If you could help with this it'd be very appreciated! Thank you!
×
×
  • 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.