-2
當我點擊一個鏈接時,所有的活動類都被刪除,但是活動類沒有添加到這個點擊的對象上!爲什麼css類沒有在每個jQuery上加上
$(".bootgrid-table th > .column-header-anchor > span.text + span.jquery-bootgrid-arrow").prev("span.text").addClass("active");
$('.bootgrid-table th > a').click(function() {
$('.bootgrid-table th > a').not(this).each(function() {
$(this).find("span.jquery-bootgrid-arrow").prev("span.text").removeClass("active");
});
$(this).find("span.jquery-bootgrid-arrow").prev("span.text").addClass("active");
});
顯示你的HTML過了,請創建[MCVE。 –
@Jamiec它是'[mcve]'。 –
@PraveenKumar我知道,這是一個錯字。但看到你已經發布它,我剛剛刪除。 – Jamiec