Jquery selector input[type=text]’)

Using a normal css selector:

$('.sys input[type=text], .sys select').each(function() {...})

If you don’t like the repetition:

$('.sys').find('input[type=text],select').each(function() {...})

Or more concisely, pass in the context argument:

$('input[type=text],select', '.sys').each(function() {...})

Note: Internally jQuery will convert the above to find() equivalent

http://api.jquery.com/jQuery/

Internally, selector context is implemented with the .find() method,
so $(‘span’, this) is equivalent to $(this).find(‘span’).

I personally find the first alternative to be the most readable :), your take though

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)