Jump to content

Help with some code for making hidden links work in mobile view

Recommended Posts

Site URL: https://ar-go.live/events

Dear Squarespace forum,
 
I use memberstack to manage my memberships via my squarespace site (ar-go.live) and zoom to host live calls for my members.
 
That said, I was having issues with members accessing hidden links eg:
 
"zoomlink/#/ms/conent/members"
 
It worked fine in desktop and now on mobile.
 
So, the lovely people at memberstack wrote me this code to deal with it and it worked like a charm (i interseted it on site-wide footer)
 

  <script>

  MemberStack.onReady.then(function(member) {  

    setTimeout(function() {

      var btns = document.querySelectorAll("[href$='#/ms/content/member']")

      btns.forEach(function(btn) {

        btn.href = btn.href.split("#")[0]

      })

    },1500)

  })

</script>  

 

The problem is that now I have another hidden content: "members-only" in addition to "members"

Would anyone know how to modify the code above to include the "#/ms/content/members-only" part as well?

Thank you so much for your help,

Riley

cleardot.gif
 
Link to comment
  • Replies 1
  • Views 540
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.