title: resize() with document or document.body.width
body: <p>How to use resize event with document width instead of window width.I need to use document width,not window.</p>
  
  <pre><code> $(window).resize(function() {
  
      if ($(window).width() &lt; 960) {
         $(document).getElementsByClass("razdel5").removeClass("d-none");
         $(document).getElementsByClass("fade-i").addClass("d-none");
      }
     else {
          $(document).getElementsByClass("razdel5").addClass("d-none");
          $(document).getElementsByClass("fade-i").removeClass("d-none"); 
     }
    });
  </code></pre>