Jump to content

Flatiron: how to RE-POINT and change a PROJECT LINK in the GRID to a second INDEX.

Recommended Posts

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

ntsc-grid.jpg

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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

ntsc-grid.jpg

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 by bangank36

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio plugin
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment

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.