JSFiddle - React, Tailwind, and code Playground

HTML

<div id="divforjohn@x"></div>

JavaScript

$('#divforjohn\\@x').css('background', 'green').html('Yay, it worked!');