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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:59:49+00:00 2026-06-09T16:59:49+00:00

as you can see on jsfiddle http://jsfiddle.net/C8B8g/7/ I have 2 button (= 2 divs)

  • 0

as you can see on jsfiddle http://jsfiddle.net/C8B8g/7/ I have 2 button (= 2 divs) “The region” and “The source”. Each div gets highlighted (blue background) on mouse over (thanks to stackoverflow contributors cause I’m still very bad in JS).

I’ve noticed that users don’t actually realize that these are buttons so what I would like to do is to have the first DIV containing the text “Our region” to be highlighted with the blue background by default and only come back to white background when the other div containing the text “our source” is clicked (in that case “our source” background would turn blue). Made some testing using “current” in CSS but without success…

  • 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-09T16:59:51+00:00Added an answer on June 9, 2026 at 4:59 pm

    Try this:
    Updated:
    Here is working jsFiddle.

    $('.activity-title a:first').css({'background-color':'#f00','color':'#fff'});
    //for setting first button highlighted by default,
    //don't forgot to define document.ready before this
    
    $('.activity-title a').click(function() {
        var region = $(this).attr('data-region');
    
        $('.activity-title a').css({'background-color':'#fff','color':'#467FD9'});
        $(this).css({'background-color':'#f00','color':'#fff'});
    
        $('.textzone:visible').stop().fadeOut(500, function () {
        //don't forgot to add stop() for preventing repeat click conflict
            $('#' + region).fadeIn(500);
        });
    
        return false;
    
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

You can see the code live here: http://jsfiddle.net/z3xV3/50/ My HTML: <div id=slider></div> <input id=sliderValue
You can see the implementation here: http://jsfiddle.net/DVp4A/ How do I get the div 'quota
I have a working version of my code here: http://jsfiddle.net/5Hqs3/24/ As you can see,
You can see the fiddle here: http://jsfiddle.net/easeS/4/ Here is the html/css I have: #main
I have got an example here: http://jsfiddle.net/cByhZ/ As you can see the buttons value
As you can see on http://jsfiddle.net/FrelCee/5zcv3/4/ , i want to animate those 3 divs
Here's my code: http://jsfiddle.net/ZspZT/ As you can see from the example, the fourth div
hello friends i have tryied folowing code as u can see here http://jsfiddle.net/QCdz4/ i
You can see the example here: http://jsfiddle.net/8EHED/8/ This is a tricky problem because I
http://jsfiddle.net/J2KuY/ In test2, you can see that instead of removing the node from the

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.