In a response to another user, I’ve upgraded the jQuery plugin iCheckbox to work with jQuery 1.5 and 1.6 (in Safari). This is described in my answer here:
jquery 1.4.2 working for iCheckBox and not jquery 1.6
But for some reason it is not working in FF4, and I need help finding the bug that affects FF4 in the code found here:
http://fiddle.jshell.net/mikkelbreum/HAGMp/
I would like help to make it work, and also some general tips on how to debug this kind of thing with firebug (I don’t get it to produce any errors, that’s the problem, so I have no clue where it’s going wrong. But it probably has to do with the animation or the conditional checking.)
Open this is Safari (works) and in FF4 (broken, no animation happening):
http://fiddle.jshell.net/mikkelbreum/HAGMp/show/
I would also like to know if it works in IE7,8,9 or not?
Update: I took a deeper look at the plugin, a lot of extra work is going on, here’s a much slimmer version that does the same stuff but doing less work and works in FF4 (without the CSS/animation plugin from the other answer listed below).
Additionally I made some tweaks – you can now click on the image before the animation finishes to toggle it back, no need to wait for the animation to finish to determine the state – instead we’re using the state of the checkbox (which is also immediately affected now). The API is the same, only the internals of the plugin changed here.
You can test it out here.
Original answer:
Background position sliding has been a bit quirky in firefox, the properties are in percent rather than px (try your demo here, look at the alert on click in firefox vs. chrome), so the animation engine just doesn’t handle it correctly. The easiest way to bypass this is hooking into the animation/CSS hooks available in jQuery, you can see a working example of that in this answer.
Also you’ll want to change to the standard
backgroundProperty, rather than specificallybackgroundPropertyXhere, like this:and further down:
Here’s the code from the other answer combined with the above in your demo, working in FF4.
Note: the above code changes (in this answer only) fix the position, the code in the other answer linked is what fixes the animating to get to that position, for example here’s a version without the animation, if you’re curious.