title: position() being treated as a function
body: <p>I am working on a slider, here is the code for it:</p>
  
  <pre><code>$(document).ready(function() {
              // MAKE SLIDER WIDTH EQUAL TO ALL SLIDES WIDTH
      var totalWidth = 0;
      $('.slide').each(function() {
          totalWidth = totalWidth + $(this).outerWidth(true);
      });
      var maxScrollPosition = totalWidth - $(".slider_wrap").outerWidth();
  
      function slideMove($targetSlide) {
          if ($targetSlide.length) {
              var newPosition = $targetSlide.position().left;
              if (newPosition &lt;= maxScrollPosition ) {
                  $targetSlide.addClass('slide--active');
                  $targetSlide.siblings().removeClass("slide--active");
                  $(".slider").animate({
                      left : - newPosition
                  });
              }
              else {
                  $(".slider").animate({
                      left : - maxScrollPosition
                  });
              };
          };
      };
      $(".slide").width(totalWidth);
  
      $(".slide:first").addClass("slide--active");
      $(".next_post").click(function(){
          var $targetItem = $(".slide--active").prev();
          slideMove('.slide');
      });
      $(".prev_post").click(function(){
          var $targetItem = $(".slide--active").next();
          slideMove('.slide');
      });
      });
  </code></pre>
  
  <p>While I would expect this to work, I am getting an error that says: TypeError: $targetSlide.position is undefined. From the if statement in the function slideMove. Why doesn't this work? I am still learning jQuery so sorry if it is an obvious answer.</p>