title: jQuery Toggle Opacity On Click Using CSS Animation
body: <p>I'm probably just retarded, but I can't seem to get this to work. All I'm trying to do is make it so when you click something (In this case, <code>#register</code>), it changes a few lines of css.</p>
  
  <p>I want to make it so when you click it once, it appears, then if you click it again, it will disappear. I wrote this, and when you first click it, it will show it, but when you click it again, it won't disappear. I just can't figure out what I'm doing wrong. XD Thank you for any help you can give :P</p>
  
  <h2>My Javascript</h2>
  
  <pre><code>$(document).ready(function () {
      $('#registerButton').click(function () {
          if ($("#register").css("opacity") === ".9") {
              $("#register").css({
                  "opacity": "0"
              });
              $("#register").css({
                  "height": "0px"
              });
          }
  
          if ($("#register").css("opacity") === "0") {
              $("#register").css({
                  "opacity": ".9"
              });
              $("#register").css({
                  "height": "260px"
              });
          }
      });
  });
  </code></pre>
  
  <p><strong>EDIT:</strong> I'm trying to use it this way so I can make some nice looking <code>css animations</code>, so just using the <code>toggle function</code> wouldn't work :(</p>