index.tsx80 chars3 lines
The code above uses the jQuery selector $('.timeslot-time[data-id="10"]')
to select the element with class .timeslot-time
and data-id
attribute equal to 10
. Then, the text()
function is used to retrieve the text content of that element, which is assigned to the timeSlot
variable, and finally logged to the console using console.log()
.
gistlibby LogSnag