Write a program to show a dropdown with Javascript ?

 Posted by Vivek.Ramapuram on 6/9/2015 | Category: Bootstrap Interview questions | Views: 443 | Points: 40
Answer:

in bootstraps we can also give action to the drop menu using javascript.

Example :
Javascript
<script type="text/javascript">

$(document).ready(function ()
{
$(".menuDrop").dropdown();
});
</script>


HTML element
Drop down page is :
<div class="dropdown">

<a href="#" class="btn btn-primary menuDrop">Menu<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Option1</a></li>
<li><a href="#">Option2</a></li>
<li class="divider"></li>
<li><a href="#">Settings</a></li>
</ul>
</div>


Asked In: While Learning | Alert Moderator 

Comments or Responses

Login to post response