Hi,
I want to add an ‘active’ state to the menu items on the mobile menu so that when users click the title it will change color or font weight.
Website link: www.sassysusa.com
Thank you ![]()
Hi,
I want to add an ‘active’ state to the menu items on the mobile menu so that when users click the title it will change color or font weight.
Website link: www.sassysusa.com
Thank you ![]()
Do you mean to add hover effect, whenever user move the mouse ?
No.
I mean a ‘clicked’ or ‘pressed’ effect when the user clicks the link.
There is no hover effect on mobile ![]()
For this you can use link.active property on the liquid link object.
It returns a boolean value (true or false depending on if the user is on that page)
You can use that property to set some css with the style attrubute
Here is an example below ![]()
- Link Title
Let me know if that helps.
Hi ![]()
@pierrewebdev Where do I place the code?
On the custom CSS or in the site code?
You’re going to have to do the following:
Also keep in mind that in my version of the code I said link.active but the word “link” will refer to whatever is used inside the for loop for the linklist object.
If you need any help with this, feel free to reach out.