I'm currently trying display text in another div after a input button is clicked
$(document).ready(function(){
$('#excellent').click(function(){
document.getElementById("voting").innerHTML = "Thank you for rating!";
setTimeout(fade_out, 3000);
function fade_out() {
$("#voting").fadeOut();
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input id="excellent" type="image" src="smile.png" name="image" width="150" height="150">
<div id="footer">
<p id="voting"></p>
</div>
The message for the innerHTML does appear and fades away, however when I click again on the image input, the text never appears again. How do I make it so that the text will always appear when clicked?
$('#voting').text('Thank you for rating!').show();function fade_out()out ofclickhandler.