안녕하세요. 저는 왜 이것이 작동하지 않는지 잘 모릅니다. 경고가 올바른 ID를 표시하지만 removeClass가 실행되지 않는 것처럼 보입니다. 내가 뭘 잘못하고 있니?변수가있는 클래스를 jQuery에서 id로 변경 하시겠습니까?
function testClassSwitch(t_id) {
alert("Do things to a button with this ID: " + t_id);
$(t_id).removeClass("add-button");
}
고마워요!
같은 아이디 전에
#
를 추가 toggleClass ... –