icheck
icheck copied to clipboard
Getting hold of original event within ifChanged function
My set up
- I have a table where each row has a checkbox (lets call them C1, C2, ... Cn)
- At the top of the table I have a check/uncheck all checkbox (Ca)
- When I check Ca I use the ifChanged-Ca event to check all the other checkboxes C1, C2, ... Cn.
- This causes the ifChanged-C1, ifChanged-C2, ifChanged-Cn events to fire
- Within this ifChanged-C1, ifChanged-C2, ifChanged-Cn events I want to have code that says something like,
function (event) {
if(triggered by checked/unchecked directly on Cn){
doA();
}
if(originally triggered by checkbox Ca){
doB();
}
}
- However I can't get hold of the original event within the event parameter. i.e. event.originalEvent is undefined.
- Any ideas how I can achieve the above?
Thanks in advance
Hey @seagullmouse Did you ever find a solution?
So long ago now, I didn't find a solution but happy to close