JSFiddle - React, Tailwind, and code Playground
HTML
<div id="divforjohn@x"></div>
JavaScript
$('#divforjohn\\@x').css('background', 'green').html('Yay, it worked!');
<div id="divforjohn@x"></div>
$('#divforjohn\\@x').css('background', 'green').html('Yay, it worked!');