title: element.querySelector(".exampleClass") is not a function
body: <p>I am trying to build a responsive carousel and am getting an error in the following code.  I've tried using JQuery, other selection methods but they all return the same error.</p>
  
  <p>I try to select the element here, first my accessing its parent element</p>
  
  <pre><code>     var carousel = $('#carousel');
       var container = carousel.querySelector('.carousel-container');
  </code></pre>
  
  <p>The about code returns and ERROR that carousel.querySelector is not a function.</p>
  
  <p>Which creates a problem, and also screws up the resizing function below:</p>
  
  <pre><code>  function slideTo(index){
        index = index &lt; 0 ? totalItems -1 : index &gt;= totalItems ? 0 : index;
        container.style = container.style.transform = 'translate(-' + (index * percent) + '%, 0)';
         currentIndex = index;
     }
  </code></pre>
  
  <p>Container.style  in the third line of the function returns an ERROR that I cannot set a property on container.style  as it is "undefined" </p>
  
  <p>I REALLY just need to be able to add the CSS "transform : translate" property to the container element. </p>
  
  <p>I am at a loss for things to try... would really appreciate some feedback! </p>