I am using bootstrap and am trying to disable an li so when the user clicks on one of the li elements in the dropdown nothing happens. Currently when I click on the top li element the dropdown closes. I want it to stay open. Most of the resources I have found have been about disabling links. I want to create a drop down similar to the one on Facebook.
Here is my html
<div class="dropdown">
  <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example
  <span class="caret"></span></button>
  <ul class="dropdown-menu">
    <li id="test"><a href="#">HTML</a></li>
    <li><a href="#">CSS</a></li>
    <li><a href="#">JavaScript</a></li>
  </ul>
</div>
here is my css
#test{
  background-color:red;
  pointer-events: none;
}
and here is a link to jsfiddle.
 
     
    