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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:53:39+00:00 2026-05-25T02:53:39+00:00

We use jQuery UI selectmenu, it rewrites our drop down boxes like so: <select

  • 0

We use jQuery UI selectmenu, it rewrites our drop down boxes like so:

<select style="width: 324px; display: none;" id="speedA" name="fruits">
    <option value="NA">Please Select</option>
    <option value="A">Apple</option>
    <option value="O">Orange</option>
    <option value="P">Pear</option>                         
</select>

<a aria-owns="speedA-menu" aria-haspopup="true" tabindex="0" href="#" role="button" id="speedA-button" class="ui-selectmenu ui-widget ui-state-default ui-selectmenu-dropdown ui-state-active ui-corner-top" style="width: 312px; background: none repeat scroll 0% 0% rgb(239, 239, 239); border: 1px solid rgb(236, 0, 140);"><span class="ui-selectmenu-status">Apple</span><span class="ui-selectmenu-icon ui-icon ui-icon-triangle-1-s"></span></a>

We have a bit of jquery which changes the background and border of this select menu if the option hasn’t been changed, which works perfectly (as you can see in the HTML above, the <a> link has already got the error colors assigned to it within style""):

if(bizzstate == "NA") $('#speedA-button').css({"background":"#efefef","border":"1px solid #ec008c"});

The problem we are having, is getting this to change back to its default colors, when it is changed:

$('#speedA-button').change(function() {
    $('#speedA-button').css({"background":"","border":"1px solid #AAAAAA"});
});

The above code doesn’t seem to work.. it just stays as its old colors.

Any help would be greatly appreciated

Update
=========

Figured out why, its because the thing changing is:

<span class="ui-selectmenu-status">Apple</span>

NOT:

<a id="speedA-button" class="ui-selectmenu ui-widget ui-state-default ui-selectmenu-dropdown error_input ui-corner-all" aria-owns="speedA-menu" aria-haspopup="true" tabindex="0" href="#" role="button" style="width: 312px;">

How do we append a change function to the span above?

  • 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-25T02:53:39+00:00Added an answer on May 25, 2026 at 2:53 am

    Put the css into a class.

    Add the class to the element:

    if(bizzstate == "NA") $('#speedA-button').addClass("specialColors");
    

    Then remove the class from the element when you dont need it:

    $('#speedA').change(function() { $('#speedA-button').removeClass("defaultColors"); });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the jQuery UI to style my HTML select menu but
I use jQuery to do AJAX calls. But specialchars like ÆØÅ (danish letter) comes
I use jquery ui to apply a drag and drop effect on a serial
I use jQuery to get the browser version like this: var x = $.browser.version;
I have two select lists which are being styled using the jQuery UI Selectmenu
I use jQuery to display an accordion menu when clicking on a menu title.
I'm just starting to use the jQuery framework. I really like the look of
I use jQuery to block ui like this $('#send').click(function() { $.blockUI({ message: '<p id=loading><img
I want to make drop-down list for categories. How to make text inside select
I use jQuery and for things like setting toggles, I find myself writing a

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.