Is there a nicer way in jQuery to do this ?
$(":text").each(function() {
if (this.style.visibility == "visible") {
开发者_如何学Python ...
};
});
yes:
$(":text:visible").each(function() {
...
});
UPDATE Since jQuery this doesn't work anymore: details.
You're looking for the :visible
selector:
$(':text:visible')
For speed use
$(':text').filter(":visible")
精彩评论