JSFiddle - React, Tailwind, and code Playground
by sjclevel
HTML
<button id="changeText">Click me!</button>
<p id="displayText">This is the original text.</p>
CSS
body {
font-family: 'Arial', sans-serif;
background-color: #f4f4f4;
padding: 20px;
}
button {
background-color: #3498db;
color: #ffffff;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #2980b9;
}
p {
font-size: 18px;
margin-top: 20px;
}
JavaScript
$(document).ready(function() {
$("#changeText").click(function() {
$("#displayText").text("This text was changed using the JavaScript Library jQuery! You can see that the JavaScript is using some special calls to make this text change.");
});
});