Apply a jQuery function to a DOM element from a list of DOM elements
I'm trying to apply a jQuery function .val() or .text() to a DOM element. I get this DOM element from a list of DOM elements like this:
and this:
and everything is alright, but the problem is when I try to apply a function to this element
or
then I get this error in the console:
TypeError: undefined is not a function
Shouldn't this work?