Jquiry identifying a button - Question | Sololearn: Learn to code for FREE!

+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.

4/23/2018 5:26:05 PM

Arne Van Kerckvoorde

1 Answer

New Answer

0

just use $("button").on("click", function(){ this.html("new text"); })