title: jquery is not working in my php file
body: <p>I just tried to make a show hide div using jquery. It was working good with HTML but when I change it to PHP, the click event is not working! </p>
  
  <p>In my college project I tried to make a <code>div</code> show and hide using jquery. It works on HTML correctly when I change the extension to PHP it is not working. I am not an expert in programming so any one please help</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;?php
  session_start();
  
  if(empty($_SESSION['username'])||empty($_SESSION['id']))
  {
      header('location://localhost/kcp/admin_login.php');
      exit();
  
  }
  else
  {
      $username=$_SESSION['username'];
      $id=$_SESSION['id'];
  }
  ?&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="jquery-3.1.1.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="jquery-ui.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="show.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="style.css" /&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
   &lt;div class="nav"&gt;
    &lt;ul&gt;
     &lt;li&gt;&lt;input type="button" value="Case view" id="caseli"/&gt;&lt;/li&gt;
     &lt;li&gt;&lt;input type="button" value="User Managment" id="userli"/&gt;&lt;/li&gt;
     &lt;li&gt;&lt;input type="button" value="Messages" id="messageli"/&gt;&lt;/li&gt;
     &lt;li&gt;&lt;input type="button" value="Logout" id="logoutli"/&gt;&lt;/li&gt;
    &lt;/ul&gt;
  
  
   &lt;/div&gt;
   &lt;div class="main"&gt;
  
   &lt;div class="case"&gt;
    &lt;?php
    //require case.php;
    ?&gt;
    &lt;p&gt;this is case&lt;/p&gt;
   &lt;/div&gt;
   &lt;div class="user"&gt;
    &lt;?php
    //require usermanage.php;
    ?&gt;
    &lt;p&gt;this is user&lt;/p&gt;
   &lt;/div&gt;
   &lt;div class="message"&gt;
    &lt;?php
    //require message.php;
    ?&gt;
   &lt;p&gt;this is message&lt;/p&gt;
   &lt;/div&gt;
   &lt;div class="logout"&gt;
    &lt;?php
    //require logout.php;
    ?&gt;
    &lt;p&gt;this is logout&lt;/p&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>here is my show.js code</p>
  
  <pre><code> // JavaScript Document
  $('#messageli').click(function()
  {
      $('.case').hide();
      $('.user').hide();
      $('.logout').hide();
      $('.message').show();
  
  });
  $('#caseli').click(function()
  {
      $('.case').show();
      $('.user').hide();
      $('.logout').hide();
      $('.message').gide();
  
  });
  $('#userli').click(function()
  {
      $('.case').hide();
      $('.user').show();
      $('.logout').hide();
      $('.message').hide();
  
  });
  $('#logoutli').click(function()
  {
      $('.case').hide();
      $('.user').hide();
      $('.logout').show();
      $('.message').hide();
  
  });
  </code></pre>