Jump to content

How to code the text block to change color with the click?

Recommended Posts

  • Replies 3
  • Views 923
  • Created
  • Last Reply

Top Posters In This Topic

For future users, use some code like this

<script>
$(document).ready(function(){
    $('div#block-yui_3_17_2_1_1691504808850_3570 a').click(function() {
        $(this).css('color','#a48f7d');
    })
});
</script>

div#b... is Text Block ID. Use this tool to find ID

https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff

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

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.