title: switchView function is not Working to access next page content
body: <p>I,m going to design admin panel for my application.I divided my home into containers. I want to show detail of clicked items in Images.html and Categories.html . when I click on menu item in 2nd container(also called side bar).I want to show detailed of images and categories but my switchView function is not working, I don,t know why I,m unable to show content of images.html and categories.html using views, but I,m unable to access my next html page,s data.Please Sincere attention here.
  Here is my admin.html(home page) code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html class="h-100"&gt;
  &lt;head&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"&gt;
  &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E=" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="stylesheet.css" /&gt;
  
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"   crossorigin="anonymous"&gt;&lt;/script&gt;
   &lt;script src="https://www.gstatic.com/firebasejs/6.6.2/firebase-app.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body class="h-100"&gt;
  
   &lt;nav class="navbar navbar-expand-lg navbar-dark bg-dark"&gt;
  &lt;div class="container-fluid"&gt;
      &lt;a class="navbar-brand" href="#"&gt;
          Wallpaper App Admin
      &lt;/a&gt;
  
      &lt;div class="dropdown navbar-right"&gt;
          &lt;button
                  id="user-email"
                  class="btn btn-secondary dropdown-toggle"
                  type="button"
                  data-toggle="dropdown"
                  aria-haspopup="true"
                  aria-expanded="false"
          &gt;
              probelalkhan@gmail.com
          &lt;/button&gt;
  
          &lt;div
                  class="dropdown-menu"
                  aria-labeledby="user-email"
          &gt;
              &lt;a class="dropdown-item" id="btn-logout" href="#"&gt;
                  Logout
              &lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/nav&gt;
  
  &lt;div class="row h-100 bg-light"&gt;
  &lt;div class="col-lg-2 bg-secondary"&gt;
      &lt;ul class="nav flex-column"&gt;
          &lt;li class="nav-item"&gt;
              &lt;a class="nav-link" href="#" onclick="switchView('images.html')"&gt;
                  &lt;span class="text-dark"&gt;Images&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
              &lt;a class="nav-link" href="#" onclick="switchView('categories.html')"&gt;
                  &lt;span class="text-dark"&gt;Categories&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="col-lg-10"&gt;
      &lt;div class="container" id="container"&gt;
          &lt;h1&gt;Images&lt;/h1&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;script src="app.js"&gt;&lt;/script&gt;
  
  &lt;script&gt;
   firebase.auth().onAuthStateChanged(function(user){
      if(!user){
          window.location.href = "index.html";
      }
  });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is my app.js:</p>
  
  <pre><code>var firebaseConfig = {
  apiKey: "AIzaSyA0nFgIbrXfWULyd9QJPZd60qfRhfAzC0Y",
  authDomain: "mywallpaperapp-8ed57.firebaseapp.com",
  databaseURL: "https://mywallpaperapp-8ed57.firebaseio.com",
  projectId: "mywallpaperapp-8ed57",
  storageBucket: "mywallpaperapp-8ed57.appspot.com",
  messagingSenderId: "900270634824",
  appId: "1:900270634824:web:4dfbcc86520c6f637ba57d"
  };
  // Initialize Firebase
   firebase.initializeApp(firebaseConfig);
  firebase.auth.Auth.Persistence.LOCAL;
  
   $("#btn-login").click(function(){
  
   var email = $("#email").val();
   var password = $("#password").val();
  
    var result = firebase.auth().signInWithEmailAndPassword(email, password);
  
   result.catch(function(error){
      var errorCode = error.code;
      var errorMessage = error.message;
  
      console.log(errorCode);
      console.log(errorMessage);
  });
  
  });
  
  $("#btn-logout").click(function(){
  firebase.auth().signOut();
  });
  
  function switchView(view){
  $.get({
      url:view,
      cache: false,
  }).then(function(data){
      $("#container").html(data);
  });
  }
  </code></pre>
  
  <p>The Problem in this block of code beacuse my switchView function is not working to access images.html and categories.html, although I coded it perfectly:</p>
  
  <pre><code> &lt;div class="col-lg-2 bg-secondary"&gt;
      &lt;ul class="nav flex-column"&gt;
          &lt;li class="nav-item"&gt;
              &lt;a class="nav-link" href="#" onclick="switchView('images.html')"&gt;
                  &lt;span class="text-dark"&gt;Images&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
              &lt;a class="nav-link" href="#" onclick="switchView('categories.html')"&gt;
                  &lt;span class="text-dark"&gt;Categories&lt;/span&gt;
              &lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Please Sincere Attention here. I,ll be very Thankful to you.</p>