1

I am having the same problem as this: jQuery click event only working after moving the mouse in Chrome, but only on mac, OS X (I checked Chrome, Firefox, and Safari). It works as intended on Windows (I ignored IE for this one).

Here's my fiddle, where cells go darker on hover and change color on click (intended), but the color change on mac happens only after you've moved the mouse (unintended): https://jsfiddle.net/martakule/gh8t2m6n/2/

Now, the moment I comment out the hover, it works fine -- the color changes right on click. So is the problem that CSS hover and jQuery click don't work together on mac? What is it?

td:not(.main):hover {
    background: #cccccc;
    background: linear-gradient(to bottom right, #cccccc, #a6a6a6);
}
Community
  • 1
  • 1

1 Answers1

0

Try to add "!important" in some of your css rules:

#yes, td.yes {
  background: green !important;
  background: linear-gradient(to top right, green, yellowgreen) !important;
}

and:

#no, td.no {
  background: red !important;
  background: linear-gradient(to bottom right, red, maroon) !important;
}

(good thing I had my mac handy!)

Fiddle here: https://jsfiddle.net/s8c7qm7g/

Hope this is what you were looking for.

Theo Orphanos
  • 1,417
  • 1
  • 19
  • 27