As you know, HTML5 allows you to use more characters in name names - see the HTML5 specification , which now holds as the only invalid character. Attempting to use this with jQuery shows that jQuery ignores all characters in the ID after a certain valid character, '/'.
<section> <div id='foo/bar'> YAAY </div> <div id='foo'> BOO </div> </section> โ
Writing the element 'foo / bar'
console.log(โ$(document).find('div#foo/bar')โโโโ)โ
Shows an invalid return item:
[ <div id=โ"foo">โ BOO โ</div>โ ]
This uses both stable jQuery (1.7.1) and the current edge of jQuery.
Is this a jQuery bug, or am I doing something wrong?
source share