If I use jquery to select all my text inputs:
var inputs = $('#form input[type="text"]');
They are wrapped in jQuery. I can do whatever I want with them.
inputs.css('height', '1000px');
As a group, they abide. But it seems to me that something is missing. I know that I can see each separately, as if it were an array of objects.
console.log(inputs[0]);
// <input type="text" />
But the above output is just html; when I do this, this is no longer a jQuery object :(
inputs[0].css('font-size', '100px');
// Uncaught TypeError: Object
How can I continue to use jquery methods for an individual user without the need to re-wrap each element, or is this impossible for some strange, dark, inexplicable reason?
Didn't even know where to start looking for this, and my jQuery journey has not led me to answer so far. Thank!
source
share