Using jQuery 3.6.1. My code is:
OSH.setDivisions = function() {
let rows = $("input[name^='compdiv']");
rows.on("blur", OSH.doDivisions(rows))
}
OSH.doDivisions = function(rows) {
alert("in doDivisions()");
if (OSH.emptyDivisions(rows) == 0) {
OSH.addDivision();
}
}
Stepping through this in Chrome developer tools, the rows.on() line causes the alert() to pop up without doing anything to the page. And if I dismiss the alert and cycle through the various "compdiv" input fields, either with the TAB key or using the mouse, the alert never triggers again. This makes no sense to me.
What am I doing wrong?