• I want to add some additional code that is triggered whenever a button is pushed. I’ve looked at the code a bit, but I’m a relative newby, so it’s not obvious how I can add an action that is triggered on any button push. Of course, it’s also important to be able to figure out something about just which button was pushed (such as it’s target url or anything else that will identify the button).

    I’ve looked back through support entries, but didn’t see anything like this, so my apologies if this has already been addressed.

    Thanks,
    -Don

    https://wordpress.org/plugins/maxbuttons/

Viewing 1 replies (of 1 total)
  • Plugin Author Bas Schuiling

    (@basszje)

    Hi Don,

    Details questions like this are quite rare, so you won’t find much on this in support. Let’s see if I can help you along.

    What is it you are trying to accomplish after the button push? The plugin itself does nothing after a button push most of the times ( the URL and such are just plain HTML actions ). So if you need some action after that it’s quite possible to add use custom Javascript and target the button like this:

    $(document).on('click','.maxbutton', function () { ... actions .. } );

    For this you don’t really need to browser around our source since it’s all frontend. Every button has the following classes : maxbutton (all), maxbutton-[id] ( where ID is the button number ) and maxbutton-[name] where name is the name you give to the button ( which can be handy in these cases since you can control the name ).

Viewing 1 replies (of 1 total)
  • The topic ‘Is there a hook that fires when button is pushed?’ is closed to new replies.