I want to add an “onClick” in one of the links in the header, is it possible to do this?
Ok after almost 2 hours I have found it. For people who also wants to add onClick to an url I, the example is below
Example file: magento\app\design\frontend\pricoll\default\layout\customer.xml
<action method="addLink" translate="label title" module="customer"><label>Log In</label><url/><title>Log In</title><prepare/><urlParams/><position>100</position><li/><a>onClick="toggleLogin()"</a></action>