merge with pull request 166
replace .attr by .prop or .data for jquery 1.9.1 compatibility