You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<html><head><scriptsrc="https://code.jquery.com/jquery-3.4.1.js"
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
crossorigin="anonymous"></script></head><body><divid="hello.world">id with dot</div><divid="hello/world">id with slash</div><divclass="hello/world/2">class with slash</div><script>$('#hello.world').css('color','red')// cannot find an elementconsole.log(document.getElementById('hello.world'))// $('#hello/world').css('color', 'red') // throws an errorconsole.log(document.getElementById('hello/world'))$('.hello/world/2').css('color','red')</script></body></html>
When you make an element with an id like "hello/world", Sizzle fails to find it and throws an error.
If it has '.' in the middle of a string, it cannot find an element.
Test Code:
When you make an element with an id like "hello/world", Sizzle fails to find it and throws an error.
If it has '.' in the middle of a string, it cannot find an element.
These are all valid id names according to the spec.
The text was updated successfully, but these errors were encountered: