HTML Snippet
<section>
<textarea class= "text" placeholder="type something"> </textarea> </br> </br>
<button id= "append"> Append </button>
<button id= "prepand"> Prepand </button>
<button id= "replace"> Replace </button>
</section>
JQuery Code Segment
$(document).ready(function(){
$('#append','#prepand','#replace').on('click', function(e){
var e1 = $(e.currentTarget);
var action = e1.attr('id');
if (action == "prepand"){
console.log("Prepending");
}
else if (action == "append") {
console.log("Appending");
}
else if(action == "replace"){
console.log("Replacing");
}});
});
I am trying to test the functionality of the buttons on my webpage, but I'm not seeing any output in the console. Can someone please assist me with this issue?