1

I am disabling a sortable using this line of code:

$(".sorrtlist").sortable('enable');

In IE they are greying out but not in Chrome, what should I do ?

I can't use ('disabled', 'disabled'); as sortable doesn't support it.

Edit I know chrome doesn't like greying out and also looked at questions you are claiming to be duplicates but NON of questions asking greying out for ".sortable"

Mathematics
  • 6,404
  • 20
  • 65
  • 133
  • 1
    @Arran non of questions tell me how to grey out "sortable" do they ? – Mathematics Mar 06 '13 at 13:09
  • Chrome doesn't like greying out, see also [this question](http://stackoverflow.com/questions/8412671/styling-of-disabled-input-elements-discrepancy-between-chrome-and-firefox). Also to reproduce you don't need jQuery, ASP.NET or JavaScript: test this and see if it shows the correct result: ``. Show screenshots to compare expected and actual results. – CodeCaster Mar 06 '13 at 13:10
  • @CodeCaster I already read the other questions you guys are giving link to and I can't use ('disbaled', 'disabled') on .sortable, can I ? – Mathematics Mar 06 '13 at 13:13
  • 2
    _"NON of questions asking greying out for ".sortable""_ - do you expect an answer for each unique question to exist on this site? Look at methods used, implement them your own way. If your question is _"How do I show a .sortable element as disabled"_, then ask that. – CodeCaster Mar 06 '13 at 13:14
  • 2
    @CodeCaster what ELSE DID I ASKED ? I am asking about .sortable and it not already been asked any where else, if you had argument with your wife don't take it OUT ON ME PLEASE ! – Mathematics Mar 06 '13 at 13:15
  • @CodeCaster sorry to hear that, I didn't knew, anyway I fixed the issue by putting my sortable into a div giving it a class name and then greying out class using fadeout – Mathematics Mar 06 '13 at 13:51
  • Don't be, it wasn't true, I was just pointing out that replies like that may be found offensive. If I say I don't understand the question, that means you can do something to help more people understand it, which will help in getting a solution faster. But nice you got it solved. :-) – CodeCaster Mar 06 '13 at 17:21

1 Answers1

1

if you are using jquery 1.6+ try prop. for more info see this answer. attr Not working in chrome

$('.class :input').prop('disabled',true);

if still problem persists. set CSS as mentioned in this disabled issue in chrome

 -webkit-text-fill-color: black
Community
  • 1
  • 1
Ravi Gadag
  • 15,331
  • 5
  • 53
  • 83