JSFiddle - React, Tailwind, and code Playground

by Alfie

HTML

<textarea id="Travellerpaymentinfo_cc_number" class="disabled" readonly="true"></textarea>

CSS

.disabled {
    background:lightgrey;
}

JavaScript

$("#Travellerpaymentinfo_cc_number").click(function () {
    if (this.readOnly) {
        alert("The textbox is clicked.");
    }
});