I am working on Google Apps Script with JQuery. I want to make focusin
event work.
var kojiNameElem = $("#koji_"+koji_id).find(".kojiName");
var kojiNameId = kojiNameElem .attr("id");
console.log("kojiNameId="+kojiNameId);//kojiNameId=koji-name-1
$(kojiNameElem).on("focusin", function(e) {
console.log("focusin");
$(e.target).removeClass("bg-danger");
}, false);
console.log("done");//done
It seems that the program is ok till I can get the element: var kojiNameId = kojiNameElem .attr("id");
. and besides, it goes till the end properly: console.log("done");
. So, I think the part I add the event has something wrong. Help me please.