title: Click event find next div to add a css class Typescript
body: <p>I would like to make a function in Typescript to find the next div and add it a css class, here is my try:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;&lt;a href="#" onclick="toggle()"&gt;Item 1&lt;/a&gt;&lt;/li&gt;
      &lt;div class="content hide"&gt;&lt;/div&gt;
      &lt;li&gt;&lt;a href="#" onclick="toggle()"&gt;Item 2&lt;/a&gt;&lt;/li&gt;
      &lt;div class="content hide"&gt;&lt;/div&gt;
      &lt;li&gt;&lt;a href="#" onclick="toggle()"&gt;Item 3&lt;/a&gt;&lt;/li&gt;
      &lt;div class="content hide"&gt;&lt;/div&gt;
      &lt;li&gt;&lt;a href="#" onclick="toggle()"&gt;Item 4&lt;/a&gt;&lt;/li&gt;
      &lt;div class="content hide"&gt;&lt;/div&gt;
      &lt;li&gt;&lt;a href="#" onclick="toggle()"&gt;Item 5&lt;/a&gt;&lt;/li&gt;
      &lt;div class="content hide"&gt;&lt;/div&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Now the function in Typescript</p>
  
  <pre><code>function toggle(){
     this.parent().next('.content').class('hide');
  }
  </code></pre>
  
  <p>Thanks guys</p>