title: Changing class of another element on click
body: <p>I'm really stuck on this. I'm trying to have the background image of a container change into another after a click event. I have my code working fine in jsfiddle but I can't get it to work on Wordpress.</p>
  
  <p>I think it might be because of the PHP but I've tested without it (using the exact jsfiddle code) to  no avail. If anyone could help point out why that would be awesomeeeee.</p>
  
  <p><a href="http://jsfiddle.net/wuHrJ/6/" rel="nofollow">Here's the code on JSfiddle</a></p>
  
  <p>And here's the code that I'm using in my website</p>
  
  <p>HTML snippet is in single-work.php:</p>
  
  <pre><code>&lt;ul class="boom_boom_selector"&gt;
  &lt;?php 
    $images = get_custom_field('work_showcase:to_array', 'get_post'); 
    foreach($images as $img) {
  ?&gt;
    &lt;li class="boom_selector"&gt;&lt;?php echo $img['post_content']; ?&gt;&lt;/li&gt;
  &lt;?php  
    }
  ?&gt;
  &lt;/ul&gt;
  
  &lt;div id="work_showcase" class="work_showcase"&gt;
  &lt;/div&gt; &lt;!-- #work_showcase --&gt;
  </code></pre>
  
  <p>JQuery in header.php:</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  $('.boom_selector').click(function(){
     $('#work_showcase').attr('class', $(this).text()); 
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>And the CSS also in header.php:</p>
  
  <pre><code>&lt;?php
      $bg_color = get_custom_field('bg_work');
      $splash = get_custom_field('work_splash');
      ?&gt;
  
          &lt;?php /* prints .extra, .web, .print */
          $images = get_custom_field('work_showcase:to_array', 'get_post'); 
          foreach($images as $img) {
          ?&gt;
      .&lt;?php echo $img['post_content']; ?&gt; {
          background-image: url("&lt;?php echo $img[guid];?&gt;");
      }
          &lt;?php  
          }
          ?&gt;
  
      ul.boom_boom_selector li {
          background-image: url(&lt;?php echo $selector ?&gt;); 
      }
  
      .work_showcase {
      background-image: url(&lt;?php echo $splash ?&gt;);
  }
  
  
      &lt;/style&gt;
  </code></pre>