You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

If you need to capture an onclick event, when your end-users click on the WProofreader badge button, you can do the following:

var buttons = document.querySelectorAll('.wsc-badge__button');

buttons.forEach(function(button) {
    button.addEventListener('click', function(e) {
        // Do what you want here on badge button click event.
    });
});