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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:12:59+00:00 2026-06-05T11:12:59+00:00

On this fiddle when I click disable’Li Point1′ the text ebcomes greyed out http://jsfiddle.net/adrianjsfiddlenetuser/Q9sHz/14/

  • 0

On this fiddle when I click disable’Li Point1′ the text ebcomes greyed out http://jsfiddle.net/adrianjsfiddlenetuser/Q9sHz/14/

Can the original styling of the element be maintained(not greyed out) ?

  • 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-05T11:13:00+00:00Added an answer on June 5, 2026 at 11:13 am

    You have three options. You can either remove the styles from jquery-ui.css for .ui-state-disabled, you can override the style in your own custom style sheet, or you can flag the altered properties as !important.

    Remove Styles

    To remove the styles, you need to edit jquery-ui.css and look for the .ui-state-disabled rule (in jQuery 1.7.2, it’s on line 262). Remove all the styles within there (you’ll see three, opacity, filter, and background-image.

    The disadvantage of this is that if you ever update jQuery and get a new CSS file to go with it, you’ll lose your edits.

    Add Own Stylesheet

    You can add your own rule for .ui-state-disabled and change the style of disabled elements. Since ui-state-disabled is used for everything in jQuery that is disabled, I’d suggest defining your rule as exclusive to li, or set a class on your ul and define the styles for that specifically.

    <ul class=".noStyleDisableDrag">
        ...
    </ul>
    
    .noStyleDisableDrag .ui-state-disabled {
        opacity: 1;
        filter: none;
        background-image: inherit;
    }
    

    Flag as !important

    You can also add the opacity, filter, and background-image style to other rules that define how that particular item is supposed to appear and use the !important flag. It isn’t the most recommended way of doing things, though, because it can wreak havoc on your CSS style debugging if you forget that you flagged it, but it is an option. To do that, you simply style your li as such:

    li {
        opacity: 1 !important;
        filter: none !important;
        background-image: (whatever you want, or none) !important;
    }
    

    Note that in this case, if you aren’t setting a background image on the draggable, then you don’t need the line to set the background-image; just set opacity and filter to be un-overridden. Also note that these CAN be overridden by JavaScript, so they aren’t set in stone.


    Of the three, you may need to use a combination. My suggestions is to use your own custom stylesheet to override the opacity and filter properties. If you are using background-images, you may need to use !important to keep it from being removed by the ui-state-disabled rule. But use the !important flag as sparingly as possible.

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

Sidebar

Related Questions

Here is my fiddle: http://jsfiddle.net/jamesbrighton/wxWgG/4/ HTML: <div> <p class=click>Click 1</p> <p>This should be ignored</p>
I have this fiddle: http://jsfiddle.net/yub2B/4/ HTML: <input type=text /> <input type=text /> <input type=text
in this fiddle, http://jsfiddle.net/urfXq/79/ , if you click on the black button, it randomly
Ooops, fiddle updated now correct In this fiddle, http://jsfiddle.net/SySRb/118/ once you click .start an
In this fiddle, http://jsfiddle.net/5L8Q8/52/ if you click the black box, it randomly selects either
In this fiddle http://jsfiddle.net/CBxbT/29/ , if you click the black box, a random color
In this fiddle http://jsfiddle.net/5L8Q8/28/ , if you click the black button, it randomly selects
Please see this fiddle and click decrease: http://jsfiddle.net/2C8fy/16/ As you can see the images
On this fiddle http://jsfiddle.net/adrianjsfiddlenetuser/zyUkd/46/ the divs 'Hello 01' & 'Hello 02' fire an alert
In this fiddle http://jsfiddle.net/dAHqe/2/ I've created examples for the 2 main uses (that I've

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.