• Resolved mbyrne46

    (@mbyrne46)


    Hi,

    I would like to incorporate javascript/jQuery with the maxbuttons that I am using however I can’t work out the correct html id to use to target the buttons. I want to use javascript to change the value of localStorage items and maybe show an alert once clicked.

    I use the ‘inspect element’ tool however I can only find ‘class’ within an ‘a’ tag for the button.

    Do the buttons have their own id’s or is there something else I can use in order to activate some code once clicked. Any help would be appreciated.

    Thanks and Regards,

    Michael

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

    (@basszje)

    Hi,

    Every button has these classes :

    .maxbutton
    .maxbutton-[id]
    .maxbutton-[name]

    You can target those with Jquery $(‘.maxbutton’) ( etc )

    There is no ID since buttons are not unique, multiple can be on the same page. But that shouldn’t stop you from running javascript on them.

    You can also bind javascript function calls on the URL ( javascript::function() );

Viewing 1 replies (of 1 total)
  • The topic ‘HTML id of MaxButtons’ is closed to new replies.