adapting jQuery syntax: using prop() instead of attr()