javascript - bootstrap dropdown on mouse over the menu item should show edit/delete icon on right side -


how include edit,delete icon in bootstrap menu item on mouse over. , while click on edit/delete icon, should call edit/delete method respectively.

need achieve in below bootstrap dropdown,

<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><a href="#">html</a></li>       <li><a href="#">css</a></li>       <li><a href="#">javascript</a></li>     </ul>   </div> 

on mouse on html/css/javascript menu item should display 'edit/delete' icon nearby.

i have done css there several many ways. can call edit or delete functions adding click event on <i> tag appropriate classname.

  ul>li>a:hover i{     display:block !important;     float:right !important;   }   ul>li>a>i{     display:none !important;   }   .glyphicon-edit{     padding-left:7%;   } 

working jsfiddle: https://jsfiddle.net/6v4d7kg9/


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -