+ 6
Jquiry identifying a button - Question
<button onClick="function" >Click me</button> <button onClick="function" >Click me</button> <button onClick="function" >Click me</button> <button onClick="function" >Click me</button> <button onClick="function" >Click me</button> I want a Jquiry script that can indentify which button is pressed and change the text without a id.
1 Odpowiedź
0
just use
$("button").on("click", function(){
this.html("new text");
})