title: Html list item keep active on hover
body: <p>I am having an issue which i would like to solve. i have created a menu for an ecommerce site. The menu works fine. Unfortunately i cannot copy the whole code here cos it is too much but i made a short version and a picture to present the structure of the menu.
  The main concept is when a button is clicked on the main nav a dropdown menu opens which has 2 columns. The left site has further buttons and the right side is where the div containers will be shown depending on the active list item on the left side. That is where the issue occours.
  Because the container opens by hovering on the list item not by clicking it. When the mouse is over the li it gets highlighted but when the mouse is out the highlight color disappears.
  I would like to keep the active li item highlighted until the mouse hovers on another li item.
  Somehow i should get the row(item) which is hovered, change the css class for highlighted and keep until another row gets hovered. Then remove the css class and do the same with the new active list.
  Hope i mad it clear. :-)
  here are the html codes and the structure.</p>
  
  <pre><code>&lt;nav class="navbar navbar-default" role="navigation"&gt;
      &lt;div class="collapse navbar-collapse navbar-ex1-collapse"&gt;
      &lt;ul class="nav navbar-nav"&gt;
          &lt;li class="dropdown"&gt;
          &lt;a class="dropdown-toggle" data-toggle="dropdown" href="#" id="button1"&gt; &lt;/a&gt;
          &lt;div class="dropdown-menu"&gt;                 
  
              &lt;div class="col-sm-3"&gt;
              &lt;ul class="submenu-list"&gt;
                  &lt;li&gt;&lt;a href="#" class="submenu-list-item" id="item1"&gt; &lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" class="submenu-list-item " id="item2"&gt; &lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" class="submenu-list-item " id="item3"&gt; &lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;/div&gt; 
  
              &lt;div class="col-sm-9" id="submenubox1"&gt;
                  &lt;h3&gt;Subbox Title&lt;/h3&gt;
                  &lt;div&gt;Content&lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="col-sm-9" id="submenubox2"&gt;
                  &lt;h3&gt;Subbox Title&lt;/h3&gt;
                  &lt;div&gt;Content&lt;/div&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
          &lt;/li&gt;  
      &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/nav&gt;       
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ZNDX1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZNDX1.jpg" alt="enter image description here"></a>
  The code im trying is the following using the menu.aim javascript:</p>
  
  <pre><code>&lt;script src="jquery.menu-aim.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script&gt;
  
          var $menu = $(".dropdown-menu");
          $menu.menuAim({
              activate: activateSubmenu,
              deactivate: deactivateSubmenu
          });
  
          function activateSubmenu(row) {
              var $row = $(row);
              // Keep the currently activated row's highlighted look
              $row.find("a").addClass("maintainHover");
          }
  
          function deactivateSubmenu(row) {
              //remove the row's highlighted look
              $row.find("a").removeClass("maintainHover");
          }
  &lt;/script&gt;
  </code></pre>
  
  <p>however this code is not working. Im am not sure if this would be the right way to solve this thought.
  Also i have tried to use to css code:</p>
  
  <pre><code>ul.class li:hover{
  background-color: red !important;
  }
  </code></pre>
  
  <p>But this is not working either.</p>
  
  <p>Here is a similar example what iam trying to achieve.
  <a href="https://rawgit.com/kamens/jQuery-menu-aim/master/example/example.html" rel="nofollow noreferrer">https://rawgit.com/kamens/jQuery-menu-aim/master/example/example.html</a></p>
  
  <p>Any help would be appropriated.
  Thank you!</p>