How to take id as selector when used hash?

前端 未结 3 1733
旧巷少年郎
旧巷少年郎 2020-11-27 08:43

Suppose of the following html:

test1
test2

Now, the following wou

3条回答
  •  春和景丽
    2020-11-27 09:14

    you have to use \ when using special characters

    var test1 = $('#test\\#1');
    

    http://bugs.jquery.com/ticket/4944

提交回复
热议问题