Works with jQuery 1.9.1

Changed attr with prop to work with jQuery 1.9.x