2

If you want to select a jquery element with 1 attribute that equals a value is simple:

$(".element[attribute1='true']").hide();

But what if you want to select an element with 2 equal attributes?

$(".element[attribute1='true', attribute2='false']").hide();

That won't work.

Mohammad
  • 21,175
  • 15
  • 55
  • 84
MarcelWeidum
  • 105
  • 2
  • 11
  • 1
    Possible duplicate of [Jquery: select an element when two or more conditions are true](http://stackoverflow.com/questions/37136123/jquery-select-an-element-when-two-or-more-conditions-are-true) – freedomn-m Sep 21 '16 at 10:40

1 Answers1

6

You can use multiple Attribute Equals Selector [name=”value”] in jquery like bottom code:

$(".element[attribute1='true'][attribute2='false']").hide();
Mohammad
  • 21,175
  • 15
  • 55
  • 84