JSFiddle - React, Tailwind, and code Playground
HTML
<div id="foo\\asdf"></div>
JavaScript
console.log( $('#foo\\\\\\\\asdf') );
// override to simulate IE behavior
document.querySelectorAll = null;
console.log( $('#foo\\\\\\\\asdf') );
<div id="foo\\asdf"></div>
console.log( $('#foo\\\\\\\\asdf') );
// override to simulate IE behavior
document.querySelectorAll = null;
console.log( $('#foo\\\\\\\\asdf') );