Replace the click handler with pure JavaScript.