chandrajavin / jquery-datepicker

Automatically exported from code.google.com/p/jquery-datepicker
0 stars 0 forks source link

$td.addClass not working on Chrome #251

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Try to add a css class in the renderCalendar method to a particular day to a 
class, let's say, that changes the background color, like this:
$td.addClass('nonworkingday');
Being the css file like this:
table.jCalendar td.nonworkingday, table.jCalendar td.nonworkingday:hover {
    background-color: red;
}

The css is applied in Firefox but not in Chrome

What is the expected output? What do you see instead?
We expect the cell to be rendered with a red background in every browser, but 
in Chrome it doesn't work

What version of the datepicker are you using? On what operating system? And 
Which Browser?
I'm using DatePicker * $Id: jquery.datePicker.js 102 2010-09-13 14:00:54Z 
kelvin.luck $ With Chrome version 7.0.517.44

I don't know if this may be related to CSS, the browser, the plugin or jQuery, 
but it doesn't seem to work in Chrome (Firefox and IE 8 work fine).

Original issue reported on code.google.com by brafa...@gmail.com on 11 Nov 2010 at 1:42

GoogleCodeExporter commented 8 years ago
Can you use the Developer Tools in Chrome to check that the class is actually 
being added to the element? I suspect that the class is added correctly but 
that there is another CSS selector which is more specific which is somehow 
overriding it. e.g. I think the problem is probably in your CSS...

If the class is not being added to the document then please provide a URL 
demonstrating the problem (or recreate it on http://www.jsfiddle.net/ )

Original comment by kelvin.l...@gmail.com on 12 Nov 2010 at 10:01

GoogleCodeExporter commented 8 years ago
You're right, the problem was in the CSS, as the class is correctly added on 
the $td element. It works now.

Sorry to bother you!

Original comment by brafa...@gmail.com on 12 Nov 2010 at 12:14

GoogleCodeExporter commented 8 years ago
Cool - glad you figured it out :)

Original comment by kelvin.l...@gmail.com on 12 Nov 2010 at 12:17