Tuesday, September 4, 2012

jQuery 1.6.1+ and .prop()

Upgrading our version of jQuery at work, and some of our code broke. We have a really nifty tree control, and we use the checkbox "indeterminate" property to get that cool tri-state look.

Well, that all broke. Pre-jQuery 1.6.1, you could set indeterminate using .attr("indeterminate", true). Now, that doesn't work. The indeterminate property needs to be set with jQuery .prop().

This may affect other properties that were previously set with .attr().