In my helper, I have a function that is dynamically creating multiple . I want the onclick event to trigger a controller function : I tried the following code :
accordionWholeDiv.setAttribute('onclick', '{!c.unfoldAccordion}');
I tried many solutions but couldn't find one working... Can somebody help me ? Thank you :-)
c
in your javascript controller is referencing an apex controller method. Are you trying to call apex? – TemporaryFix Jan 22 '19 at 16:09unfoldAccordion
function already exist in your component's controller? – Jayant Das Jan 22 '19 at 16:12<input type="button" onclick="{!c.unfoldAccordion} value="unfold""/>
– TemporaryFix Jan 22 '19 at 16:13