JSFiddle - React, Tailwind, and code Playground

HTML

<input name="foo" id="dif.dif" checked="checked" type="radio">
<input name="foo" id="dif.bar" checked="checked" type="radio">

JavaScript

$('[id="dif.dif"').css('outline', 'dashed 2px red')
$('#dif\\.bar').css('outline', 'dashed 2px blue')