JSFiddle - React, Tailwind, and code Playground

by gurvinder372

HTML

<input data-id="check stage<lead>" type="checkbox" title="Select/Unselect Column" name="chk-stage-column-select" value="" onchange="">

JavaScript

// escape jquery selectors
    function jQueryEscape(str) {
        if (str)
            return str.replace(/([ #;?%&,.+*<>~\':"!^$[\]()=>|\/@])/g, '\\$1');

        return str;
    }
    
    
      var StageName = "<lead>";
  
  console.log($("[data-id='check stage" + StageName + "']"));
  $("[data-id='check stage" + StageName + "']").prop("checked", true);