Assigning A Class Based On Which Page Your On

Hi All!

I posted a query here before and got great help from the community so thought i would post again, this may be a topic that people need help with often so hopefully if anyone can help it would be useful to people.

I have a site where everything is almost perfect except the naviagtion bar. It works completely fine, but when you click on one of the options, no colours change so can seem confusing to the user.

The html is question is in nav.html lines 3 - 9

The class which i’d like to activate upon the page loading is currently called ‘.active’

The css that controls this class is is in _nav.scss line 61-68.

The link to my github is here >

Not sure if what I’m aiming to do can be done entirely with css? I’ve been told JS discussion is off topic here so if anyone is aware of a way of doing this entirely in CSS i’m open to ideas.

Again huge thanks to anyone who takes the time to have a look.

Hi All

Ignore this question, the answer was indeed only possible with jQuery, which i have just figured out.

Thanks anyway,

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.