I am wondering if there is a way to split a jQuery selector that contains a set of elements into an array of selectors, one for each element. For example, I have:
fields = row.find('input');
which returns a selector containing multiple input elements. I know I can use
fields.eq(index).val()
to access individual values, but is there an easy way to build or convert fields into an array of selectors, so I can just use
fields[index].val()
Edit:
Yes, I understand that you can use .toArray (), but as mentioned below, this returns an array of DOM elements. Then you have to iterate over them to convert them to selectors - too much extra work.
source
share