I have the following jQuery code:
$("#contact-form-applet").on("focusout",".dc2-ltfc", {ctx:this},function(event) {
var curRowDiv = $(this);
var rowObject = {};
curRowDiv.find("input, textarea").each(function(e){
rowObject[ $(this).attr("aria-label") ] = $(this).val();
});
console.log(rowObject);
});
The problem is that the code runs every time a field loses focus (field layout), and not a full div that loses focus.
Here is a JS Fiddle link demonstrating the problem.
I would like to call the code only when a particular line of the div loses focus, so that I can run the update once, and not every time the field in the line is updated.
source
share