Use .prop() in place of .attr() in appropriate places

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>