title: Jquery - Find attributes in Navigation
body: <p>I have a navigation (selfmade HTML, no CMS).  </p>
  
  <p>Code:  </p>
  
  <pre><code>&lt;ul id="navmenu" class="open"&gt;
          &lt;li&gt;&lt;a href="/" class="nav-home"&gt;&lt;i class="menu-icon icon-home"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#" data-filter="one"&gt;&lt;i class="menu-icon icon-one"&gt;&lt;/i&gt;&lt;span&gt;One&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#" data-filter="two"&gt;&lt;i class="menu-icon icon-two"&gt;&lt;/i&gt;&lt;span&gt;Two&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#" data-filter="three"&gt;&lt;i class="menu-icon icon-three"&gt;&lt;/i&gt;&lt;span&gt;Three&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#" data-filter="four"&gt;&lt;i class="menu-icon icon-four"&gt;&lt;/i&gt;&lt;span&gt;Four&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;  
  </code></pre>
  
  <p>Now I want to realize a "current" state.<br>
  Example:<br>
  If page "ONE" is loaded, the icon span text should be displayed right besides the Icon (normal state: <code>display:none;</code>)<br>
  When a Page is loaded the sitename is in the body-tag like:   </p>
  
  <pre><code>&lt;body class="site one"&gt; 
  </code></pre>
  
  <p>I need to figure out which site or which class is added in the body tag and display the "state" in the navigation.  </p>
  
  <p>Pseudo Code:  </p>
  
  <pre><code>If "class" is in body &gt;
  search for "class" in navigation (search for data-"class" attribute)&gt;
  and display span   / set class "active"
  </code></pre>
  
  <p>Can you push me in the right direction? Thank you!</p>