title: Why the if is done 1time in a each loop
body: <p>I'm trying to loop over each article in a list but in my JS the if statement is done 1x at the end. (look the scheme bellow)</p>
  
  <ol>
  <li>loop over each article </li>
  <li>take the article in the collection where the title is the same as
  the actual title </li>
  <li>check the owner of the article in the collection and the user</li>
  <li>if it's not the same hide the article</li>
  </ol>
  
  <p>And it's only hiding the first article:</p>
  
  <pre><code>  $('.titreArticle').each(function(i, obj) {
      title= obj.textContent;
      var art =  Articles.findOne({titre: title });
      console.log("id co: " + id + " /id art: " + art.owner);
      //it only hide the first &lt;li&gt;
      if(art.owner != id){
        document.getElementById("liArticle").style.display = "none";
      }
    });
  </code></pre>
  
  <p>And I join 2 screenshots:
  <a href="https://i.stack.imgur.com/jYh2D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jYh2D.png" alt="We can see the check of the owner id"></a>
  <a href="https://i.stack.imgur.com/QPgG8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QPgG8.png" alt="And we can see that he only hide the first one (but the first one shouldn&#39;t be hide)"></a></p>
  
  <p>We can see the check of the owner id in the first picture. 
  Then we can see that he only hide the first one (but the first one shouldn't be hide)  </p>
  
  <p>[EDIT] there is my template code for the Article:</p>
  
  <pre><code>&lt;template name="article"&gt;
    &lt;li id="liArticle"&gt;
      &lt;div&gt;
          &lt;img id="pic" src= {{photo}} /&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;label class="titreArticle"&gt;{{titre}}&lt;/label&gt;
          {{#if isOwner}}
             {{#unless wantModif}}
          &lt;button class="delete" style="color:black"&gt;&amp;times;&lt;/button&gt;
          &lt;button class="modify" style="color:black"&gt;modifier&lt;/button&gt;
            {{/unless}}
          {{/if}}
          &lt;p id="dateHeure"&gt;&lt;strong&gt;Ecrit par: {{username}} le {{date}} à {{heure}} {{lieux}} &lt;/strong&gt;&lt;/p&gt;
          &lt;br&gt;
      &lt;/div&gt;
      &lt;div id="textContenu"&gt;
          &lt;span&gt;{{text}}&lt;/span&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/template&gt;
  </code></pre>