I am trying to get a value from my table cells using jQuery. I am new to jQuery and I tried many things, but nothing gave me the sought result.
Below are some examples of what I've tried so far.
I simply want to get the text between the tags.
The DOM looks like this :
I tried with :
This gets you every 3rd
td in every
tr, thats why you're getting all that text appended.
After you convert all the columns
class.. You can do something like this:
Using the image in your question, this would return
To explain the selector:
$('#lblEditDeleteProducts .priceDom') this will return an array of all the elements with class of
priceDom inside the element with id
.eq(0) this will return the first element in the array from above
.text() this will return the text of the element above