Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4268262
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:00:44+00:00 2026-05-21T07:00:44+00:00

im trying to make an active state with jquery… heres my code that isn’t

  • 0

im trying to make an active state with jquery…

heres my code that isn’t working..

<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
   jQuery('ul#menuHov a[href$="' + window.location.pathname + '"]').addClass("menuHov"); 
});
</script>

and the menu…

<ul id="menuHov">
    <li style="width:128px"><a href="" ><span>SHOP<br/>SHOP</span></a></li>
    <li style="width:193px"><a href="/collections" ><span>COLLECTIONS<br/>COLLECTIONS</span></a></li>
    <li style="width:147px"><a href="/about-local-celebrity"><span>ABOUT<br/>ABOUT</span></a></li>
    <li style="width:186px"><a href="/stockists" ><span>STOCKISTS<br/>STOCKISTS</span></a></li>
    <li style="width:146px"><a href="/press" ><span>PRESS<br/>PRESS</span></a></li>
    <li style="width:128px"><a href="/category/blog" ><span>BLOG<br/>BLOG</span></a></li>
    <li style="width:70px"><a href="/contact" ><span>CONTACT<br/>CONTACT</span></a></li>
</ul>

and the class i want as active state…

.menuHov {color:#fae349}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:00:45+00:00Added an answer on May 21, 2026 at 7:00 am

    it works fine for me:

    http://jsfiddle.net/maniator/JYc8g/ (click run if u don’t see it work right away)

    make sure the path is correct, use the firebug or chrome console to check what window.location.pathname is on the page you want

    UPDATE

    seems to be a css issue change line 95 of user.css to:

    #headerMenu ul li a:hover, a.menuHov {
       color: #00AEEF !important;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make an ID active only when a certain type of
I am trying to make a program that shows all the active applications. I
I'm trying to make an AutoHotKey macro that's active only in Windows Explorer but
I'm trying to make a JQuery accordion which will change it's style to .active{}
I am currently trying to make a navigation-menu where an active-class is applied to
Trying to make a make generic select control that I can dynamically add elements
I'm trying to make a context menu for a control that is linked to
I am trying to make a div, that when you click it turns into
I am trying to make a JTable that has column spans available. Specifically, I
I'm trying to make a pseudo link class with the CSS3 text-shadow for both

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.