<li class="nav-item">
    <span class="planning-pains">Planning des livraisons de pain</span>
</li>
<script type="text/javascript">
    $('.nav-item .planning-pains').click(function(){
        displayMsg('<img src="/static/img/Planning_pain.png"/>')
    })
</script>