in Jquery, I would like to only display on my 2nd datalist the results that are correctly linked to some attributes of the selection made on the 1st datalist
I tried many many things but I do not manage to sort on the attributes of the selected item of the 1st datalist
1st datalist is like that:
<input id="boxCli" name="cat1" list="cat1" placeholder="Catégorie 1">
<datalist id="cat1">
<option data-prod="100" value="Chef de Projet">Chef de Projet</option>
<option data-prod="50" value="Mécanique">Mécanique</option>
</datalist>
2nd datalist is similar:
<input id="boxCli2" class="box2" name ="cat2" list="cat2" placeholder="Catégorie 2">
<datalist id="cat2">
<option data-cat="1" value="Gestion de projet">Gestion de projet</option>
<option data-cat="1" value="Réunion / Client">Réunion / Client</option>
</datalist>
I would like to display the second datalist only if the custom attribute data-prod in 1st datalist is == to 100
Thanks !!