title: Jquery Mobile Filter system, can't hide multiple divs
body: <p>I'm making a Jquery Mobile app and have a page with 15 or so divs with class', I'm trying to make a filtering system so that when you press a button some of these divs disappear depending on the class. There are 3 groups and they all have an "all" class to display everything making 4 classes total.</p>
  
  <p>Unfortunately most of the js I use never works even if I set up a jsfiddle for jquery mobile when I put it into my app it doesn't seem to work.</p>
  
  <p>I wanted to use</p>
  
  <pre><code>function show(target) {
      document.getElementsByClassName(target).style.display = 'block';
      }
  function hide(target) {
      document.getElementsByClassName(target).style.display = 'none';
      }
  </code></pre>
  
  <p>But that doesn't work whereas <code>document.getElementById</code> seems to work fine. However obviously I can only hide/show 1 div per button..</p>
  
  <p>I was wondering if there was a work around for this or something completely different I should try?</p>
  
  <p>Here's a jsfiddle of what I have: <a href="http://jsfiddle.net/tzcx7gky/" rel="nofollow">http://jsfiddle.net/tzcx7gky/</a>
  It's completely broken in jsfiddle but it works fine in my code, which is odd..</p>