I have a function with a chain of filters in jQuery. I am trying to set the focus() on the first element of my last filtered set of elements.
This gives me my desired result set, so I've gotten that far:
$("div[class='st_d']").filter(function() {
return !($(this).css('visibility') == 'hidden' || $(this).css('display') == 'none');
}).find(":input[type=text]");
What I am trying to do is something like this, where on my desired result set, set focus on the first element in that result:
$("div[class='st_d']").filter(function() {
return !($(this).css('visibility') == 'hidden' || $(this).css('display') == 'none');
}).find(":input[type=text]:first").focus();
Thanks!