title: Hiding a navigation bar with .hide()
body: <p>I have searched and searched trying to figure out what is wrong with my code. I would like to hide the navigation bar completely at a certain screen width but I am getting absolutely nothing. JS fiddle and Code Pen can't find anything and safari isn't showing syntax errors. I have only been at this a month, here it is I appreciate any help.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;title&gt;No clue what I am doing&lt;/title&gt;
      &lt;link href="css/bootstrap.min.css" rel="stylesheet"/&gt; 
      &lt;link href="stylesheet.css" rel="stylesheet" type="text/css" /&gt;     
    &lt;/head&gt;
    &lt;body&gt; 
   &lt;nav class="navbar-default"&gt;
    &lt;div class="container-fluid"&gt;
      &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"&gt;
          &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;/button&gt;     
      &lt;/div&gt;
      &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
      &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;
        &lt;ul class="nav navbar-nav"&gt;     
          &lt;li&gt;&lt;a href="#"&gt;Link&lt;/a&gt;&lt;/li&gt;    
        &lt;/ul&gt;
      &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
    &lt;/div&gt;&lt;!-- /.container-fluid --&gt;
  &lt;/nav&gt; 
  
       &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/jquery-2.1.3.min.js"&gt;&lt;/script&gt; 
      &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="java.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>JAVASCRIPT</p>
  
  <pre><code>$(document).ready() 
  var width = function(checkWidth) {
  if(window.width&gt;768) {
  $("nav .navbar-default").hide()
  } else {
  $("nav .navbar-default").show()
  }
  };
  width;
  </code></pre>