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 8601343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:49:12+00:00 2026-06-12T01:49:12+00:00

I create a new site on this domain keksik.com Here you can see navigation

  • 0

I create a new site on this domain keksik.com
Here you can see navigation menu at the top.

The problem is that I need the font color of active menu item to be black even when it is not hovered. And the same thing should be applied to parent menu item when I hover on the child item.

So, I think I need to use javascript here to change font color to black dynamically if the menu item has background image.

I tried to add this code to head, but nothing changes:

<script type="text/javascript">

$(document).ready(function(){
    if ($(#top #nav li).css('background') == 'url(images1/mtbg.gif) no-repeat left center') {
    $(#top #nav li a).css('color', 'black');
  }  

});
</script>

So, I hope you can help me with this problem. Thank you in advance.

  • 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-06-12T01:49:13+00:00Added an answer on June 12, 2026 at 1:49 am

    hmm.. not sure I understand, but maybe something like this would work:

    var strBG = "url(images1/mtbg.gif) no-repeat left center";
    $("#top #nav li a").live("hover", function(){
        if ($(this).parent().css("background") == strBG)
        {
            $(this).css("color", "black");
            $(this).parent().css("color", "black");
        }
    });
    $("#top #nav li").live("hover", function(){
        if ($(this).css("background") == strBG)
        {
            $(this).css("color", "black");
            $(this).find("a").css("color", "black");
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating new Site Definitions using this method: http://weblogs.asp.net/paulballard/archive/2007/04/09/creating-a-custom-sharepoint-2007-portal-site-definition-using-the-portalprovisioningprovider-class.aspx and when they get created,
I create new blank solution. Add exist web site. Structure: Solution E:...\projectname Folders: bin
Planning to create a new website for our product using ASP.NET MVC 4. Site
I am trying to move my current site over to a new domain, except
new to dreamhost here and have followed the wiki on this but still need
On my web site I would like to have several sub-domains. Files that create
Can someone see what I'm doing wrong here. I Would expect it to redirect
I am struggling to create appropriate 301 redirects for a site that was originally
I'm running MOSS 2007 and have created a new site under an existing one
I've created a new ASP.NET Web Site in VS2008. I'm attempting to rebuild an

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.