selector - jQuery - How to match an element has attribute a or attribute b -


how write jquery selector match element has attribute or attribute b. must match 3 elements below

<a a="123" b="345"></a> <a a="123"></a> <a b="345"></a> 

you can use multiple selector (,) attribute-equals selector (or other selectors), example:

$("a[a=123], a[b=345]") 

you can test out here.


Comments

Popular posts from this blog

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -