I’m wondering how to fix this problem in Zepto library. It happend’s when I tried to run:
$("#pro@");
It’s pointing line 77 which is:
$.qsa = $$ = function(element, selector){
return slice.call(element.querySelectorAll(selector))
}
Can u Help me?
What element are you trying to select? Does it have an @ character in the name? For example:
The @ character is a reserved character that isn’t expected in selectors. Basically, Zepto or jQuery would be looking for “#pro” plus the “@” selector which it does not understand.
The way to get around this is to escape the @ character. In CSS you would do “#pro\@” so in JavaScript you need to do:
A better strategy would be to just use a-z, 0-9, – and _ in your ID’s.