title: Two if statements in a row arent working
body: <p>i want to create a slider with if statements while using the keyboard, left n right, up and down.</p>
  
  <p>i thought the solution is an if statement, but when i´m clicking n arrow key both of the animations are starting.</p>
  
  <pre><code>$(document).ready(function () {
  
    var content_left = $('.content').css('left');
  
  
  
  function moveLeft() {
  
     if (content_left = "-100vw") { 
     console.log(content_left);
         $('.content').animate({
              left: "0vw"
          }, 1000);
      }
  
    if (content_left = "-200vw") { 
      console.log(content_left);
         $('.content').animate({
              left: "-100vw"
          }, 1000);
      }
  
      };
  
  
  
  function moveRight() {
  
  
    if (content_left = "0vw") { 
         $('.content').animate({
              left: "-100vw"
          }, 100);
      }
  
   if (content_left = "-100vw") { 
      console.log(content_left);
         $('.content').animate({
              left: "-200vw"
          }, 100);
      }
  
      };
  
  
  $(document).keydown(function(e){
      if (e.keyCode == 39) { 
         moveRight();
         return false;
      }
  
     if (e.keyCode == 37) { 
         moveLeft();
         return false;
      }
      });
  
   });
  </code></pre>
  
  <p>here is a link to a codepen with this problem:</p>
  
  <p><a href="http://codepen.io/davidliebermann/pen/zxdwoz" rel="nofollow"> CODE PEN</a></p>
  
  <p>(only left and right – but you can see what the problem is)</p>