Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to get the text of a clicked elemet by javascript

$(document).click(function(event) {
    var text = $(event.target).text();
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: reduce 
Javascript :: check radio button jquery 
Javascript :: jquery clear text in div 
Javascript :: how to validate express js form 
Javascript :: json to array javascript 
Javascript :: pagination.js example codepen 
Javascript :: sort array without changing the original js 
Javascript :: what is a promise 
Javascript :: string contains at least one number 
Javascript :: js remove first character from string 
Javascript :: react if statement 
Javascript :: google tuner 
Javascript :: full month name using moment 
Javascript :: js get datatable attr value on click 
Javascript :: javascript trigger keypress 
Javascript :: how to use post method axios 
Javascript :: button disappears after click javascript 
Javascript :: javascript string error 
Javascript :: react onchange multiple functions 
Javascript :: momentjs docs 
Javascript :: material ui textfield with chips 
Javascript :: knex.js migration create 
Javascript :: jquery vertical scroll 
Javascript :: subset in js 
Javascript :: how to check if local storage is available 
Javascript :: jQuery - Add Elements 
Javascript :: convert a string array into object using kerys 
Javascript :: md5 checksum javascript 
Javascript :: function that search a biggest value in array javascript 
Javascript :: react Spread Attributes conditionally 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =