Hi!
I'm using a plugin that will automatically add on a classname whenever that page is active
For instance,
<div class="page1 active"></div>
<div class="page2"></div>
<div class="page3"></div>
If the user goes to page2, it will be
<div class="page1"></div>
<div class="page2 active"></div>
<div class="page3"></div>
How do I use jQuery to detect and write something that
if .page2 and .active {
change background colour to red
} else if (.page3 and .active) {
change background colour to blue
}
Thanks you for reading and assistance!



Reply With Quote
