Use jQuery prop method instead of attr