JQuery - How to match an element has attribute a or attribute b?

You can use a multiple selector ( ) with the attribute-equals selector (or any other selectors), for example.

Up vote 1 down vote favorite share g+ share fb share tw.

How to write a jquery selector to match an element has attribute a or attribute b. It must match three elements below jquery selector link|improve this question asked Oct 8 '10 at 12:02complez3841718 62% accept rate.

You can use a multiple selector (,) with the attribute-equals selector (or any other selectors), for example: $("aa=123, ab=345") You can test it out here.

I think 123 and 345 shown in the above questions are just dummy values. – Salman A Oct 8 '10 at 12:21 @Salman - You may certainly be correct, in that case use @Nox's answer, if they weren't and you need to match the values, the above is how to do that. – Nick Craver?

Oct 8 '10 at 12:22 Why I can't find out that way? – complez Oct 8 '10 at 12:25 @complez - I don't understand the comment, can you clarify? – Nick Craver?

Oct 8 '10 at 12:27.

Or generally for mere presence of attribute $("aa, ab").

1 +1 - Also a very valid answer, now that you posted this the question seems much more ambiguous. – Nick Craver? Oct 8 '10 at 12:06.

Try this $('ab="345",aa=123 ') See the jQuery Multiple selector docs.

1 +1 for reference – BrunoLM Oct 8 '10 at 12:18.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send