Using $.fn.prop instead of $.fn.attr when applicable.