mardi 9 janvier 2018

Check checkboxes that match regEx pattern

In this JSFIDDLE I want to check all checkboxes that match a given pattern.

In this case "Full Feed" and "Flight Feed" should be checked.

(I have jquery loaded. If possible I would like to avoid using additional libraries.)

my ideas

  1. I somehow have to trace if I'm modifying the regEx Pattern and fire a function fun1.

  2. fun1 uses the pattern and compares it to all names in myjson

  3. If the match is true the checked status of the box is to be altered.

  4. If the regEx pattern field is empty/cleared everything should be unchecked but it should still be possible to check by hand/mouse.

Any advice?




Aucun commentaire:

Enregistrer un commentaire