$(document).ready(function () {
$("#divHeader")) {
$(this).hover(function () {
$(this).find('#edit').show();
$(this).find('#spandate').removeClass("datetime");
$(this).find('#spandate').addClass("edit");
},
function () {
$(this).find('#edit').hide();
$(this).find('#spandate').addClass("datetime");
$(this).find('#spandate').removeClass("edit");
});
});
在我的页面中,我有 3 个具有相同名称的 div ("divHeader") ,但它仅适用于第一个 div 并跳过其他两个。
请告诉我如何申请所有使用ID?