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

  • Home
  • SEARCH
  • 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 683725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:44:20+00:00 2026-05-14T01:44:20+00:00

I have a routine that dynamically changes a select list’s selected option when the

  • 0

I have a routine that dynamically changes a select list’s “selected” option when the corresponding image from a carousel widget is clicked (it’s a wordpress template selector).

I’d just like to add a flash of background color, then fade to white, to give the user a visual cue that they’ve just changed the value of the template chooser select list.

I’ve attempted at it below to assign the className “mySelectedOption” to the selected option, but its not working.

I’m sure there is perhaps a better way to get the visual cue I’m looking for, (since the css change is static and wont fade back to white background)

$('#carousel ul li').click(function(e) {
    var myOption = $(this).children('img').attr('title');
    $("#myTheme option[value='"+myOption+"']").attr('selected', 'selected');
    $("#myTheme :selected]").attr('className', 'mySelectedOption');

    });
  • 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-14T01:44:21+00:00Added an answer on May 14, 2026 at 1:44 am

    Try this instead

    $("#myTheme")
        .css('backgroundColor', '#A9A9A9') //set some color
        .animate({
            backgroundColor: "#ffffff" //now fade to white 
        }, 'slow'); //instead of slow you can also specify a time in milliseconds
    

    I recall that you need to use the jQuery color plugin to animate the backgroundColor property. But don’t know if that still holds true for the new jQuery version. You will have to check that yourself.

    According to Michal’s answer jQuery itself still can’t do it but jQuery UI can. But including jQuery UI for this purpose only is an overkill

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 354k
  • Answers 354k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I posted here, and then i finally figured it out… May 14, 2026 at 8:23 am
  • Editorial Team
    Editorial Team added an answer With the inverse for loop, you're only doing one variable… May 14, 2026 at 8:23 am
  • Editorial Team
    Editorial Team added an answer Unforunately you can't natively manipulate a margin through an animation.… May 14, 2026 at 8:23 am

Related Questions

I have a WinForm TreeView Control that displays the Parent Child relationship of CaseNotes(I
I am currently designing a font engine for an embedded display. The basic problem
I am dynamically creating a table which I want to have clickable rows. When
I have a javascript variable which is referencing a complex object (it is a
I'm securing the DB by only allowing interaction with the DB through a series

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.