I need to quickly test my code and display the result in a specific area.
There's a button that should trigger something to be displayed when clicked. Right now I'm just using an alert for testing purposes.
$(document).ready(function () {
$('#btn1').click(myFunction);
});
function myFunction() {
$('#res1').alert('hi');
}
Here's my CSS:
#btn1 {
position: relative;
width: 50px;
height: 25px;
margin-left: 90px;
margin-top: 10px;
background-color: #008080;
}
#res1 {
position: relative;
width: 550px;
height: 550px;
}
My HTML is straightforward:
<div id="btn1">Send</div>
<div id="res1"></div>