title: jQuery hide div, remove background and change page width on click
body: <p>I'm trying to hide a div on click (well i'm trying to slide it to the left), but what it will have to do is also from the main page div swap the background and also i think, swap the width of another div. I've got it swapping the background and removing the things I don't want (although they slide down rather then to the left)</p>
  
  <p>This video shows what happens (and then at the end i use firebug to show you what i want to happen) <a href="http://www.youtube.com/watch?v=tti_L_ofelg&amp;feature=youtu.be" rel="nofollow">http://www.youtube.com/watch?v=tti_L_ofelg&amp;feature=youtu.be</a> (edit: video online now)</p>
  
  <p>Here is my html for the sliding div:</p>
  
    
              
                  
                      
                          
  
                           
                              
                                  
                              
                                  
                              
  
  <p>The CSS:</p>
  
  <pre><code>.slidingDiv {
  
  }
  
  .show_hide {
      display:none;
  }
  </code></pre>
  
  <p>And the jQuery:</p>
  
  <pre><code>var defOpen = 1;
  
   jQuery(".slidingDiv").show();
          jQuery(".show_hide").show();
  
          jQuery('.show_hide').click(function(){
  
          if(defOpen == 1)
  {
      jQuery(".show_hide").show();
      jQuery("#bgwrap").css("background","url(assets/stripeclear.png) fixed 0 0 repeat-y")
      jQuery("#primary_right").css("width","")
      jQuery(".slidingDiv").slideToggle();
      defOpen = 0
  
  } else {
      jQuery(".show_hide").show();
      jQuery("#bgwrap").css("background","url(assets/stripe.png) fixed 0 0 repeat-y")
  
      jQuery(".slidingDiv").slideToggle();
      defOpen = 1
  }
  </code></pre>
  
  <p>So it's bgwrap that has the image in it that i have to swap to a clear one (to stop it being there as it's a fixed image on the left)</p>
  
  <p>and primary_right seems to be the one when I remove the width goes full screen (what i'm really trying to acheive)</p>
  
  <p>It also needs to be able to toggle closed and open!</p>
  
  <p>Thanks for any help you can give!</p>