BrokeMyLegBiking
BrokeMyLegBiking

Reputation: 5988

jquery selector which finds an element which has an attribute with one of several values

I need a jquery ninja to help me find the best jquery selector to solve my need:

// pseudo jquery selector:
var match = $('table[facet=ProductCateogory or ProductCatagoryTier2 or DocumentCategory]')


// this would not match:
<table facet="EiaBrand"

// this would match:
<table facet="ProductCategory"

Upvotes: 0

Views: 109

Answers (1)

Felix Kling
Felix Kling

Reputation: 817228

I think you have to specify them separately using the multiple selector ,:

var match = $('table[facet=ProductCateogory],table[facet=ProductCatagoryTier2],table[facet=DocumentCategory]')

Upvotes: 3

Related Questions