0

I'm trying to add the link to the first element of the dropdown that is "MORE" so that I could go to another page but I'm not able to do that. I have tried it many times but not able to do it.

The Code:

<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" style="font-family: 'Roboto', sans-serif; font-size: 15px; color: white;">More<b class="caret"></b></a>
  <ul class="dropdown-menu">
    <li><a href="#">Python</a></li>
    <li><a href="#">AngularJS Framework</a></li>
    <li><a href="#">.NET Framework Development</a></li>
    <li><a href="#">Swift App Development</a>   </li>
    <li class="divider"></li>
    <li><a href="Blogs/Java/Java-Page.aspx">Java App Development</a></li>
  </ul>
</li>
Sebastian Brosch
  • 42,106
  • 15
  • 72
  • 87

2 Answers2

0

If you need the submenu to display onclick, consider using jQuery. Or if you want the menu to appear on hover, remove the jQuery in this fiddle and uncomment the piece of CSS that will handle that. - https://jsfiddle.net/awwys0z6/1/ . Otherwise, you may have to restructure your menu like this - Show hide divs on click in HTML and CSS without jQuery

$('.dropdown').click(function() {
    $('.show').toggle('.show');
});
Community
  • 1
  • 1
iMarketingGuy
  • 636
  • 4
  • 10
-1

Using jQuery

$('element').on('click', function(){
//do whatever u want
});

Using javascript

<nav>
<div onclick="linkFn()">click here</div>
</nav>

function linkFn() {
//do whatever u want
}
SESN
  • 1,275
  • 13
  • 22
  • 1
    While your answer is possibly correct, you do not refer to the question at all. This is essentially a random piece of code without any explanation. Mind to change your code to actually refer to the code in the quesiton, and add a bit of additional explanaiton of what it's doing? – Johannes H. Jun 09 '16 at 17:34