title: How to collect text from lines of a table?
body: <p>I'm creating a userscript that collects and displays text from the following table using javascript / jQuery:</p>
  
  <pre><code>&lt;table id="table-cours"&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td class="calendar-time"&gt; time1 &lt;/td&gt;
              &lt;td&gt;
                  &lt;div class = popup-calendar-event&gt; popup content 1 &lt;/div&gt;
                  &lt;div class = "link-event"&gt; event 1 &lt;/div&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td class="calendar-time"&gt; time2 &lt;/td&gt;
              &lt;td&gt;
                  &lt;div class = popup-calendar-event&gt; popup content 2 &lt;/div&gt;
                  &lt;div class = "link-event"&gt; event 2 &lt;/div&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td class="calendar-time"&gt; time3 &lt;/td&gt;
              &lt;td&gt;
                  &lt;div class = popup-calendar-event&gt; popup content 3 &lt;/div&gt;
                  &lt;div class = "link-event"&gt; event 3 &lt;/div&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I want to collect all the text contained in this table except that which is contained within the <code>div.popup-calendar-event</code> elements.</p>
  
  <p>My objective is to display it like this:</p>
  
  <ul>
  <li><strong>time 1</strong> : event 1</li>
  <li><strong>time 2</strong> : event 2</li>
  <li><strong>time 3</strong> : event 3</li>
  </ul>
  
  <p>The problem is that the number of lines of the table can change, here I put 3 lines but they can be 1 or 10 or any other number.</p>
  
  <p>I tried many ways like using the <code>not()</code> method, or a <code>for()</code> loop with an array of "tr" elements but it never works.</p>