morne
morne

Reputation: 4179

find where id string contains a certain string

Im trying to find items that have a value set to true, but Im having a difficult time to find ids containing a certain string

id*['_conf']

var items = $jointlist.find("input[type=hidden] id*['_conf']").filter(function() { return this.value == 'true'});

Please can you help

Upvotes: 0

Views: 993

Answers (1)

tymeJV
tymeJV

Reputation: 104775

Close, your id selector is a bit off:

$jointlist.find("input[type=hidden] [id*='_conf']")

https://api.jquery.com/attribute-contains-selector/

Upvotes: 3

Related Questions