$(function () { let $area = $('#with-placeholder'); let placeholder = $area.prop("placeholder"); let changed = false; $area.addClass("auto-hint"); $area.html(placeholder); $area.on("click", function (e) { // if (changed) return console.log("click"); $(e.target).removeClass("auto-hit"); $(e.target).html(""); return true }) });