• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Custom Solutions » Bootstrap dropdown menu
Bootstrap dropdown menu
fsalamic
Posts: 16
Reputation: 0

Message # 1 | 2:34 PM
Code

<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="$HOME_PAGE_LINK$">$SITE_NAME$</a>
</div>

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="/load"><i class="fa fa-list fa-lg"></i> Anime Lista</a></li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input class="form-control" placeholder="Search" type="text">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-right">
<?if($USER_LOGGED_IN$)?>
<div class="btn-group">
    <a href="$PERSONAL_PAGE_LINK$" class="btn btn-default">$USERNAME$</a>
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
      <div class="btn-group">
       <ul class="dropdown-menu" role="menu">
<li><a><i class="fa fa-users" aria-hidden="true"></i> Vrsta korisnika : <b>$USER_GROUP$</b></a></li>
<li><a href="$PM_URL$"><i class="fa fa-envelope" aria-hidden="true"></i> Privatne poruke <?if($IS_NEW_PM$)?><span class="badge">$UNREAD_PM$</span><?else?><span class="badge">0</span><?endif?></a></li>
<?if($ADD_ENTRY_LINK$)?><li><a href="$ADD_ENTRY_LINK$"><i class="fa fa-plus fa-fw"></i>Dodaj novu epizodu</a></li><?endif?>

<li class="divider"></li>
<li><a href="$LOGOUT_LINK$"><i class="fa fa-sign-out" aria-hidden="true"></i> Odjavi se</a></li>
</ul>
</div>
<?else?><!--<s5212>-->Welcome<!--</s>--> <b>$USERNAME$</b>
<?endif?></ul>
</div>
</div>
</nav>
This is my code for my navbar
I am trying to make a user options menu ,but the dropdown menu isn't working properly i've even included my bootstrap.min.js.
Can someone help me?

Also,here is the link to the website i'm working on http://animebih.at.ua/
Post edited by fsalamic - Thursday, 2016-04-28, 2:34 PM
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 2 | 9:36 AM
fsalamic, your links to the Bootstrap JavaScript files are wrong. They should point to:
Code
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.js"></script>

not to:
Code
<script type="text/javascript" src="/css/bootstrap.min.js"></script>
<script type="text/javascript" src="/css/bootstrap.js"></script>

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
fsalamic
Posts: 16
Reputation: 0

Message # 3 | 10:08 PM
It's still not working.
Cyberdasm
Posts: 639
Reputation: 7

Message # 4 | 11:24 PM
fsalamic, not just JS script of bootstrap. link also the CSS. and do not use JS in the header put it on the footer.

Added (2016-05-01, 11:24 PM)
---------------------------------------------
this is how to link
Put it in the header section
Code
<link href="/css/bootstrap.min.css" rel="stylesheet">


Put it in the footer section
Code
<script src="/js/bootstrap.min.js"></script>

1F4BF3B
Post edited by bigblog - Monday, 2016-05-02, 6:30 PM
fsalamic
Posts: 16
Reputation: 0

Message # 5 | 9:34 PM
Oh well,it doesn't matter anymore I've decided to go without it.
Funny thing I've noticed though everytime I clicked on the link that had bootstrap js the website toolbar blinked (disappeared for a moment).
So anyway moderators , you can close this thread now.
Thanks so much to everyone who tried to help me with this.
uCoz Community » For Webmasters » Custom Solutions » Bootstrap dropdown menu
  • Page 1 of 1
  • 1
Search: