在jQuery中用变量作为id更改类?

Tws*_*Elf 1 variables jquery class

嘿所有,我不知道为什么这似乎不起作用.警报弹出正确的id,但removeClass似乎没有被触发.我究竟做错了什么?

function testClassSwitch(t_id) {
    alert("Do things to a button with this ID: " + t_id);
    $(t_id).removeClass("add-button");
}
Run Code Online (Sandbox Code Playgroud)

谢谢!

ros*_*533 6

t_id# id选择器吗?