Change the text of clicked element with 'this' in JavaScript / jQuery callback
问题 Can anybody explain is this in the callback. Example. Web page. <html> <head> <script src="https://code.jquery.com/jquery-1.11.2.js"></script> <script src="myApp.js"></script> </head> <body> <button type="button" id="btn001">Show</button><br/> <p id="p001" class="article">Some contents...</p> <button type="button" id="btn002">Show</button><br/> <p id="p002" class="article">Other content...</p> <!-- more paragraphs --> </body> </html> First, I had written a function for each paragraph. Source