Use prop rather than attr, as now required by jQuery