Remove spyscroll class from last li

I’m using Bootstrap spyscroll on my nav. The last list-item #contact has a different style than the other links. I want to stop it from appending the .active spyscroll class when i click it. How can i do this?

CSS

.navbar-inverse .navbar-nav>.active>a {
    background-color: #000;
    border-radius: 30px;
    box-shadow: 0 0 1px;
}

li.contact{
    background-color: rgba(0,0,0,0);
    border-radius: 100px;
    border: 2px solid rgba(255,255,255,1);
}

HTML

<ul class="nav navbar-nav navbar-right">
<li><a href="#about">About</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#photos">Photos</a></li>
<li class="contact"><a href="#contact" class="contact">Contact</a></li>
</ul>

add “!important” to the li.contact settings?

It still appends class=“active” to each li link when clicked (spyscroll) I need to stop it from appending to <li class="contact">

Why?

If you specify that the contact li’s style overrides the active’s, then it will style itself correctly, regardless.

I’m trying to remove the .navbar-inverse .navbar-nav>.active>a styling on .contact not add anything.

bootstrap.js (spyscroll)

Example
<li><a href="#about">About</a></li>
onclick
<li class="active"><a href="#about">About</a></li>

I know what bootstrap is.
The easiest (and proper) solution is still to override the styling.

.navbar-inverse .navbar-nav>.active>a {
    background-color: #000;
    border-radius: 30px;
    box-shadow: 0 0 1px;
}

li.contact{
    background-color: rgba(0,0,0,0);
    border-radius: 100px;
    border: 2px solid rgba(255,255,255,1);
}
li.contact a {
    background-color: rgba(0,0,0,0) !important;
    border-radius: 100px !important;
    box-shadow: none !important;
}

If you’re absolutely dead set on ‘this class must not exist’, then you can: (In descending order of preference)
1: Not have a div with ID “contact” in the body.
2: Add a onclick to the contact handler to delay for 0.1 seconds and then remove the class
3: Run a continually looping setInterval to check for the existance of the active class in the contact and remove it.

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