title: Show a div only on small screens with jquery or css
body: <p>I want to show this html code, only on small screens.</p>
  
  <pre><code>&lt;div id="NightDiv" class="w3-center" style="padding-top:20px"&gt;&lt;i id="nightMode2" class="fa fa-moon-o fa-lightbulb-o w3-cursor-pointer w3-amazon"  aria-hidden="true"&gt;&lt;/i&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is what I am trying with no success:</p>
  
  <pre><code>$(document).ready(function() {
  
  if ((screen.width&gt;=1024) ) {
   $("#NightDiv").hide();
  }
  else {
   $("#NightDiv").show();
  
  }
  });
  </code></pre>