I'm working on an input helper class in JS with jQuery. The class should be able to autocorrect inputs like "2,99" to "2.99" or "1200" to "12:00"
based on what class the input field has. No hard task but since I really don't want to bind the class to all input fields manually I tried using the .on('blur','.__gui_helper, GUIH.blur)
method.
So far so good and works as expected. BUT! If I add another blur handler to a single input field it will always fire first! Which makes sense in the way the .on() method is working. But is there any way to get around this?
I guess I could use the .keyup() method but actually, I don't need to check the correct format on every keystroke.
P.S. it is NOT a duplicate on how to change the order of execution of events. read the question again. or get to know how .on() works to fully understand the question -_- There is no way to sort the execution with the data attribute or smth.