JSFiddle - React, Tailwind, and code Playground

by Joe

HTML

<input id="element" type="button" value="enter" />

JavaScript

$("#element").click(function() {
  var $this = $(this);
  if ($this.data('clicked')) {
    func(some, other, parameters);
		alert('clicked false');
  } else {
    $this.data('clicked', true);
    func(some, parameter);
		alert('clicked true')
  }
});