JSFiddle - React, Tailwind, and code Playground
by dshilkret
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jQuery on() Example</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<button id="myButton">Click Me!</button>
<p id="output"></p>
<script>
$(document).ready(function() {
// Attach a click event handler to the button
$('#myButton').on('click', function() {
// Change the text of the paragraph when the button is clicked
$('#output').text('Button was clicked!');
});
});
</script>
</body>
</html>