Speed up :visible:input selector avoiding filter

Posted by macca1 on Stack Overflow See other posts from Stack Overflow or by macca1
Published on 2010-03-19T17:45:51Z Indexed on 2010/03/19 17:51 UTC
Read the original article Hit count: 190

I have a jQuery selector that is running way too slow on my unfortunately large page:

$("#section").find(":visible:input").filter(":first").focus();

Is there a quicker way to select the first visible input without having to find ALL the visible inputs and then filtering THAT selection for the first? I want something like :visible:input:first but that doesn't seem to work.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript