JSFiddle - React, Tailwind, and code Playground
by zono
HTML
<div id="wrapper">
<h2>Ще гласувате ли?</h2>
<h2 id="message"></h2>
<input type="button" id="yes" value="Да"/>
<input type="button" id="no" value="Не"/>
</div>
CSS
#message {
display: none;
}
input[type="button"] {
height: 100px;
width: 200px;
font-size: 200%;
}
#wrapper {
margin: 0px auto;
width: 60%;
}
}
JavaScript
$( "#no" ).mouseover(function() {
$(this).hide(0,function() {
$("#message").text("");
$("#message").show(function() {
$(this).text("Няма такава опция. Искаш друг да реши вместо теб ли? ");
});
});
});
$( "#yes" ).on("mouseover click", function() {
$("#no").show(0,function() {
$("#message").text("");
$("#message").show(function() {
$(this).text("Мъдро решение.");
});
});
});