JSFiddle - React, Tailwind, and code Playground
by mischah
HTML
<a href="#" id="button">Button</a>
JavaScript
// Self calling anonymous function to make of use the $ shortcut
// Even when using jQuery.noConflict();
(function ($) {
// Short form of $(document).ready();
$(function () {
// Code goes here …
$('#button').bind('click', function() {
alert('User clicked');
});
//$('#button').trigger('click');
$('#button').bind('schnoesel', function() {
alert('schnoeselt');
});
//$('#button').trigger('schnoesel');
});
}(jQuery));