title: How to get the rotational value of an object JQuery/CSS
body: <p>I have a code to rotate and image back and forth based on YOffset. However, I want to know how to get the degrees that my image has been rotated and use that as my if statement.</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function() {
          var sdegree = 0; 
          $(window).scroll(function() {
              sdegree = ( window.pageYOffset &gt; 1000 ) ? sdegree + 4 : sdegree - 4;
              var srotate = "rotate(" + sdegree + "deg)";
              $(".plane").css({
              transform : srotate
          });
        });
      });   
  &lt;/script&gt;
  </code></pre>
  
  <p>What I want:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function() {
          var sdegree = 0; 
          $(window).scroll(function() {
              sdegree = ( //INSERT DEGREES that .plane has been rotated &gt; 30deg )// ? sdegree + 4 : sdegree - 4;
              var srotate = "rotate(" + sdegree + "deg)";
              $(".plane").css({
                  transform : srotate
              });
          });
      });   
  &lt;/script&gt;
  </code></pre>