onclick event on buttons

Posted in: Newspaper
Post count: 20

Hi
I have to add an onclick event on all my website buttons. But I can´t do it with image info box module and buttom module. Any idea?

Thanks in advance

Post count: 22421

Hi,

What event are you trying to add? Chances are you will have to use js to do it if it;s not among the theme or composer settings.

Thanks

Post count: 20

I need to add a tag attribute, for example <button onclick=”myFunctionEvent();”> but actually the button are generated by shortcode, for that reason I don’t know how to add this attribute onclick. Thanks

Post count: 20688

Hi,

You could use a raw HTML element and enter a HTML button button there with the properties you need, for example
http://prntscr.com/mmjr4uhttp://prntscr.com/mmjraj
This would be a solution, you could give it a try.

Thanks

Post count: 20

Hi

I know this solution. But I have to do this change in a lot of pages.

Do you mean I can´t use image info box module and buttom module for this goal?

Thank you

Post count: 20688

Maybe if you modify the image box code in the tagDiv composer files, but that modification will be lost after an update.

There could be plugins that allow adding extra parameters to links/buttons at once, haven’t tried any myself. Or there could be other solutions that can be adapted
https://wordpress.org/support/topic-tag/onclick/
https://wordpress.stackexchange.com/questions/269826/how-can-i-add-onclick-event-to-a-specific-wordpress-menu-link

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.