I have an array of different elements stored from a previous selection, call it 'a'.
How do i then do another select from this previous selection (a) and just return elements of type input?
I have an array of different elements stored from a previous selection, call it 'a'.
How do i then do another select from this previous selection (a) and just return elements of type input?
a.filter('input').each(function() {
alert('My name is ' + $(this).attr('name'));
});
To just get a selection from the current selection this way:
var $inputs = a.filter('input');
You can even comma separate selectors:
var $els = a.filter('input, .fooMonger, #something');