0

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

morne
  • 4,035
  • 9
  • 50
  • 96
  • Possible duplicate of [Find all elements on a page whose element ID contains a certain text using jQuery](http://stackoverflow.com/questions/1206739/find-all-elements-on-a-page-whose-element-id-contains-a-certain-text-using-jquer) – rymdmaskin Apr 19 '17 at 13:10

1 Answers1

3

Close, your id selector is a bit off:

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

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

tymeJV
  • 103,943
  • 14
  • 161
  • 157