jQuery >= 1.6 requires using .prop() instead of .attr()