Show <DIV> that contain <LI>: visible

Show <DIV> that contain <LI>: visible

Bonjour, je souhaite mettre en place une carte des réalisations d'un constructeur classées par Ville. Chaque ville s'inscrit  dans une DIV contenant une LISTE affichant les programmes réalisés dans cette ville, avec deux états possibles : "LIVRÉS / EN COURS"

Hello, I want to set up a map of the achievements of a manufacturer classified by City. Each city is registered in a DIV containing a LIST showing the programs realized in this city, with two possible states: "DELIVERED / IN PROGRESS"

<div class="filter-commune">City A
<ul class="li_prgm">
<li class="prgm-item"><a href="#'" data-link="livres">ITEM A1</a></li>
<li class="prgm-item"><a href="#'" data-link="in_progress">ITEM A2</li>
<li class="prgm-item"><a href="#'" data-link="livres">ITEM A3</li>
</ul></div>

Under the map three links are used to select: <all> all programs • <in_progress> current programs • <delivered> delivered programs
The script that masks the programs delivered or running works on the other hand I can not hide the DIV not achieving any achievement according to the choice of display.
The idea is to hide the <div> then to browse all <div> and if one of its <li> is visible then we display the <DIV>, but obviously my code is not good :-)
Thank you in advance for your help and your precious lights
# Yours truly - Pascal


<section id="carte_realisations"><div>
<div class="filter-commune"><a href="#">City A</a><ul class="li_prgm">
<li class="prgm-item"><a class="link filter-simple-item in_progress" href="#" data-link="in_progress">item A1</a></li>
</ul></div>
<div class="filter-commune"><a href="#">City B</a><ul class="li_prgm">
<li class="prgm-item"><a class="link filter-simple-item delivered" href="#" data-link="livres">item B1</a></li>
<li class="prgm-item"><a class="link filter-simple-item delivered" href="#" data-link="livres">item B2</a></li>
</ul></div>
<div class="filter-commune"><a href="#">City C</a>
<li class="prgm-item"><a class="link filter-simple-item delivered" href="#" data-link="livres">item C1</a></li>
<li class="prgm-item"><a class="link filter-simple-item in_progress" href="#" data-link="in_progress">item C2</a></li>
</ul></div>
<div class="filter-commune"><a href="#">City D</a><ul class="li_prgm">
<li class="prgm-item"><a class="link filter-simple-item delivered" href="#" data-link="livres">item D1</a></li>
<li class="prgm-item"><a class="link filter-simple-item delivered" href="#" data-link="livres">item D2</a></li>
<li class="prgm-item"><a class="link filter-simple-item in_progress" href="#" data-link="in_progress">item D3</a></li>
<li class="prgm-item"><a class="link filter-simple-item in_progress" href="#" data-link="in_progress">item D4</a></li>
</ul></div>
</div></section>

<a class="link filter-prgm" href="#" data-filter="tous">Tous</a> • <a class="link filter-prgm" href="#" data-filter="in_progress">En cours</a> • <a class="link filter-prgm" href="#" data-filter="livres">Livrés</a>


The SCRIPT

$(".filter-prgm").click(function(){
var value=$(this).attr('data-filter');
if(value==="tous"){$('.filter-simple-item').show('500');}
else {$(".filter-simple-item").not('.'+value).hide('2000');$('.filter-simple-item').filter('.'+value).show('2000');}
      $('.filter-commune').each(function()
      if(!$(this).has('li:visible').length){$(this).hide();}else{$(this).show();}});});