title: Hide/Show menu item depending on account works but
body: <p>I have a management menu item available if a user has a Manager account. If the user does not, the menu item is hidden. It works fine but something is off on the css.</p>
  
  <p>If i click an item within the management menu and then click another menu item outside of the management, it doesnt work and the hyperlink shows # at the end. Why? Also when i shrink the menu, it shows the label of the menu item. If i take the div out, it works fine but of course the management menu will be avialable to every account. Please see screenshot below.</p>
  
  <pre><code>&lt;div id="management_menu" style="display:none"&gt;
   &lt;li class="mm-dropdown"&gt;
    &lt;a href="#"&gt;&lt;i class="menu-icon fa fa-chain"&gt;&lt;/i&gt;&lt;span class="mm-text"&gt;Management&lt;/span&gt;&lt;span class="badge badge-primary"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;ul&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a href="#"&gt;&lt;span class="mm-text"&gt;Accounts&lt;/span&gt;&lt;/a&gt;
                            &lt;ul&gt;
                               &lt;li&gt;
                                  &lt;a tabindex="-1" href="user_profile_view_all.php"&gt;&lt;span class="mm-text"&gt;All Accounts&lt;/span&gt;&lt;/a&gt;
                               &lt;/li&gt;
                               &lt;li&gt;
                                  &lt;a tabindex="-1" href="user_profile_view_dispatchers.php"&gt;&lt;span class="mm-text"&gt;Dispatchers&lt;/span&gt;&lt;/a&gt;
                               &lt;/li&gt;
                               &lt;li&gt;
                                  &lt;a tabindex="-1" href="user_profile_view_parts_department.php"&gt;&lt;span class="mm-text"&gt;Parts Department&lt;/span&gt;&lt;/a&gt;
                               &lt;/li&gt;
                               &lt;li&gt;
                                  &lt;a tabindex="-1" href="user_profile_view_technicians.php"&gt;&lt;span class="mm-text"&gt;Technicians&lt;/span&gt;&lt;/a&gt;
                               &lt;/li&gt;
                               &lt;li&gt;
                                  &lt;a tabindex="-1" href="user_profile_view_specialists.php"&gt;&lt;span class="mm-text"&gt;Specialists&lt;/span&gt;&lt;/a&gt;
                               &lt;/li&gt;
                               &lt;li&gt;
                                  &lt;a tabindex="-1" href="user_profile_view_supervisors.php"&gt;&lt;span class="mm-text"&gt;Supervisors&lt;/span&gt;&lt;/a&gt;
                               &lt;/li&gt;
                               &lt;li&gt;
                                  &lt;a tabindex="-1" href="user_profile_view_managers.php"&gt;&lt;span class="mm-text"&gt;Managers&lt;/span&gt;&lt;/a&gt;
                               &lt;/li&gt;
                            &lt;/ul&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_invoices_view.php"&gt;&lt;span class="mm-text"&gt;View All Invoices&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_leads_view.php"&gt;&lt;span class="mm-text"&gt;View All Leads&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_parts_view.php"&gt;&lt;span class="mm-text"&gt;View All Parts&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_techinspections_view.php"&gt;&lt;span class="mm-text"&gt;View All Tech Inspections&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_techinspections_view.php"&gt;&lt;span class="mm-text"&gt;View All Contract Inspections&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_checklists_view.php"&gt;&lt;span class="mm-text"&gt;View All Checklists&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_hdds_view.php"&gt;&lt;span class="mm-text"&gt;View All HDDs&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_partswarranty_view.php"&gt;&lt;span class="mm-text"&gt;View All Parts Warranty&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
                   &lt;li class="mm-dropdown"&gt;
                      &lt;a tabindex="-1" href="management_mkregchecklist_view.php"&gt;&lt;span class="mm-text"&gt;View All MK Reg. Checklists&lt;/span&gt;&lt;span class="label label-warning"&gt;&lt;/span&gt;&lt;/a&gt;
                   &lt;/li&gt;
        &lt;/ul&gt;
  </code></pre>
  
  <p></li>
  </p>
  
  <pre><code>&lt;script&gt;
  var logged_in = "&lt;?php echo $_SESSION['account_type'] ; ?&gt;";
     if(logged_in === "Manager") {             
          document.getElementById('management_menu').style.display = 'block';
  
     } else {
         document.getElementById('management_menu').style.display = 'none';                          
     }
  &lt;/script&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8qGXa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8qGXa.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/39CJQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/39CJQ.png" alt="enter image description here"></a></p>