Reputation: 3081
I need help getting a jQuery plugin (iCheckbox) to work with jQuery 1.6
I set up an example here:
http://jsfiddle.net/mikkelbreum/HAGMp/
If you load jQuery 1.5.2 instead of 1.4.4 the sliding animation stops working. But the change event still fires and changes the output txt.
If you load jQuery 1.6 The animation is still broken, and the change event also stops firing (or the output txt is not changed at least.
Upvotes: 1
Views: 354
Reputation: 3081
got it.
There were two problems with the code one making it incompatible with jQuery 1.5 and 1.6 and one making it incompatible with jQuery 1.6.
The first problem was the use of the
backgroundPosition property
in the animate calls, they needed to be changed into the
backgroundPositionX property
for jQuery 1.5 and 1.6
The second problem was the check for whether the checkbox is checked or not. In jQuery 1.4 and 1.5 this could be done with
if ( $(this).attr('checked') == true )
but in jQuery 1.6 this does not work, it need to be changed into
if ( $(this).is(':checked') )
The code found here works for jQuery 1.6: http://jsfiddle.net/mikkelbreum/HAGMp/
Upvotes: 1