replaced attr and removeAttribute with non-jquery equivalent