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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:03:21+00:00 2026-06-11T10:03:21+00:00

While working fine Chrome and IE7-9, firefox brings yet another surprise… http://jsfiddle.net/D3zXj/ What I’m

  • 0

While working fine Chrome and IE7-9, firefox brings yet another surprise…

http://jsfiddle.net/D3zXj/

What I’m trying to do is to change the color of Select according to the color of the selected option. For some mysterious reason it doesn’t work in firefox.

Any ideas why?

$('#selectstat_sch').change(function(){
    $(this).css('color',$('option:selected',this).css('color'));
}).trigger('change');
  • 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-11T10:03:21+00:00Added an answer on June 11, 2026 at 10:03 am

    Elaborating on the undefined, we may want to validate first our css property,

    This should also work if some other properties are present.

    http://jsfiddle.net/D3zXj/2/

        var style=$('option:selected',this).attr('style');
        var matches=style.match(/color:([^;]+)/);
        if (matches) $(this).css('color',matches[1]);
        //else alert('no match');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this JSFiddle . It works fine in Firefox (14.0.1), but fails in Chrome
i'm using solr+haystack(django plugin) on the backend and the search is working fine; While
The following code works fine in chrome and Firefox, but breaks in IE 9.0
I can't seem to get this working in Chrome 22.0, but it works fine
I am using Junit 4. My whole program is working fine. I am trying
While working with ssh I sometimes write to long string/commands eg. command -param 3
While working on something non-development related, I noticed something interested while on answers.com .
While working on my final project for my AS/400 Course, I encountered this problem
While working with Database records ,displaying them on HTML and storing their ID into
While working a project tonight, I ended up using one .js resource file for

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.