a.filter('input').each(function() {
alert('My name is ' + $(this).attr('name'));
});
To simply select 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');
See http://docs.jquery.com/Traversing/filter
source
share