LAZARU Posted April 22, 2022 Share Posted April 22, 2022 Site URL: https://www.ntsc.me/work https://www.ntsc.me/work Second Index: https://www.ntsc.me/index_2#/index_2_2/ Hello Friends. I'm hoping someone can help a bit here. I will be so thankfull!!! This is the FLATIRON GRID. I just need to change and (re/point) the link of one specific thumb/project (image/Title and view word link), to open a second index instead of open the relative project. With this script: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $('#grid .item a div.wrapper div.project-title h3').click(function() { window.location = "https://www.ntsc.me/index_2#/index_2_2/"; }); </script> The word “VIEW” in the rollover of the project thumb in the grid, is point already perfect to the second index, but have two bad things: —>1- Is just working in the word “VIEW” of the thumb ( need to work over all this thumb ans not just in the word view ) —>2- Is changing the links for the “VIEW” words from all the projects thumbs of the grid. ////// SO! I just need a bit of help with the script in order to make this link (re-pointing) happen, and be able to ( for very very Huge projects) use a dedicated index...., letting users arrive there from the principal index by a click over a MAIN inicial thumb. Thanks a lot!, for your smart help! LA Link to comment
Beyondspace Posted April 22, 2022 Share Posted April 22, 2022 (edited) 1 hour ago, LAZARU said: Site URL: https://www.ntsc.me/work https://www.ntsc.me/work Second Index: https://www.ntsc.me/index_2#/index_2_2/ Hello Friends. I'm hoping someone can help a bit here. I will be so thankfull!!! This is the FLATIRON GRID. I just need to change and (re/point) the link of one specific thumb/project (image/Title and view word link), to open a second index instead of open the relative project. With this script: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $('#grid .item a div.wrapper div.project-title h3').click(function() { window.location = "https://www.ntsc.me/index_2#/index_2_2/"; }); </script> The word “VIEW” in the rollover of the project thumb in the grid, is point already perfect to the second index, but have two bad things: —>1- Is just working in the word “VIEW” of the thumb ( need to work over all this thumb ans not just in the word view ) —>2- Is changing the links for the “VIEW” words from all the projects thumbs of the grid. ////// SO! I just need a bit of help with the script in order to make this link (re-pointing) happen, and be able to ( for very very Huge projects) use a dedicated index...., letting users arrive there from the principal index by a click over a MAIN inicial thumb. Thanks a lot!, for your smart help! LA for the 2nd point you can try: <script> (function() { window.addEventListener('DOMContentLoaded', () => { const items = document.querySelectorAll('#collection-59bac074b7411c7376935ca2 #grid .item > a') if(items.length){ items.forEach(item => { console.log(item); item.setAttribute('href', 'https://www.ntsc.me/index_2#/index_2_2/') }) } }) })() </script> Edited April 22, 2022 by bangank36 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! 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