JSFiddle - React, Tailwind, and code Playground

by skram

HTML

<div id="test"></div>

JavaScript

$(function() {
    $.exists = function (selector) {        
        return $(selector).length > 0;
    }
        
    alert($.exists('#test'));

});