title: Disable slick slider when viewport is less than 481px
body: <p>I have a while loop that display posts using the <a href="http://kenwheeler.github.io/slick/" rel="nofollow noreferrer">slick slider</a> multiple items format.</p>
  
  <p>This displays and works with no problems. </p>
  
  <p>I want to be able to 'disable' the slick slider functionality when the viewport is less than 481px and just list the posts.</p>
  
  <p>I have a conditional javascript function (below) to target viewports less than 481px</p>
  
  <pre><code>jQuery(window).on('resize',function()
     {
           var viewportWidth = jQuery(window).width();
  
           if (viewportWidth &lt; 481)
           {  
           }
           else
           {
  
           }
     });
  </code></pre>
  
  <p>I've added some jquery to remove the classes multiple-items, slick-slider and slick-initialized. The slides disappear. I would like to continue to display all the posts.</p>
  
  <p>Can someone please point me in the right direction on how I can deactivate the slick slider functionality when viewing the site on viewports less than 481px?</p>
  
  <p>Full code: </p>
  
  <pre><code>&lt;div id="box" class="multiple-items"&gt;
      &lt;?php
      while($search_results_featured_users-&gt;have_posts()) : ?&gt;
          &lt;div&gt;
              &lt;a href="&lt;?php the_permalink();?&gt;"&gt;
                  &lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
                  &lt;?php the_excerpt(); ?&gt;
              &lt;/a&gt;
          &lt;/div&gt;
      &lt;?php
      endwhile;
      wp_reset_postdata(); ?&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
      jQuery(document).ready(function(){
  
          // on screen resize
          jQuery(window).on('resize',function()
          {
              var viewportWidth = jQuery(window).width();
  
              if (viewportWidth &lt; 481)
              {
                  jQuery("#box").removeClass("multiple-items slick-initialized slick-slider");
              }
              else
              {
  
              }
          });
  
          jQuery('.multiple-items').slick({
                  infinite: true,
                  slidesToShow:6,
                  slidesToScroll: 2,
                  autoplay: true,
                  autoplaySpeed: 5000,
                  pauseOnHover: false,
                  dots: false,
                  arrows: true,
                  speed: 500,
                  cssEase: 'linear',
              });
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help much appreciated.  </p>