Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下内容:
<a id="menuPrev"> <div class="sprite-contol-double-180"></div> </a>
有没有办法可以使用 jQuery 将类更改为“sprite-blank”
你可以这样做:
$('#menuPrev > div').removeClass('sprite-contol-double-180').addClass('sprite-blank');
你需要这个代码:
$("#menuPrev > div").attr("class","sprite-blank");