JSFiddle - React, Tailwind, and code Playground
by Tushar Jadhav
HTML
<span class="switchery switchery-small" style="box-shadow: rgb(223, 223, 223) 0px 0px 0px 0px inset; border-color: rgb(223, 223, 223); transition: border 0.4s, box-shadow 0.4s; background-color: rgb(255, 255, 255);">
<small style="left: 0px; transition: background-color 0.4s, left 0.2s;">Left 0</small>
<small style="left: 100px; transition: background-color 0.4s, left 0.2s;">Left 100</small>
<small style="transition: background-color 0.4s, left 0.2s;">No Left</small>
</span>
JavaScript
if ($('.switchery').has('small').find('small').css('left') == '0px') {
$('.switchery').click(function () {
alert('hey')
});
}