navbar

highlight menu on scrolling (if reach div)

泄露秘密 提交于 2019-12-03 11:33:09
问题 i want highlight the menu point if the div is scrolled // or clicked. http://jsfiddle.net/WeboGraph/vu6hN/2/ (thats an example what i want) my code: (JS) $(document).ready(function(){ $('nav a').on('click', function(event) { $(this).parent().find('a').removeClass('active_underlined'); $(this).addClass('active_underlined'); }); $(window).on('scroll', function() { $('.target').each(function() { if($(window).scrollTop() >= $(this).position().top) { var id = $(this).attr('id'); $('nav a')

Bootstrap two navbars collapsing

筅森魡賤 提交于 2019-12-03 11:13:14
问题 In bootstrap i want to have two navbars below eachother. My idea: Navbar 1 has a brand: main menu. Navbar 2 (below navbar1) has a brand called: sub menu. When the user looks at the site on his mobile phone he/she sees two collapsible navbars. The user can now choose wich navbar to open. The menu or the sub menu. I just copied the standard code on the bootstrap website: http://getbootstrap.com/components/#navbar Strange thing is. When i make my browser small. Two collapsed navbars appear.

bootstrap amazon style search bar

丶灬走出姿态 提交于 2019-12-03 11:04:00
问题 Is there an easy way to do something similar to this in bootstrap? A search bar with a drop down selector for a different category? I've been looking through their documentation, something similar to this but with the dropdown being attached to the search bar is what I'm looking for. I want it to be part of my navbar. I recall seeing an example online but can't seem to find it now. Also wondering where it would go in relation to my header at the moment <header class="navbar navbar-fixed-top

How to Active nav bar in bootstrap with jquery

耗尽温柔 提交于 2019-12-03 09:11:06
I want make the navbar active when i click it,, Here is the jquery i use $(document).ready(function () { $('.navbar li').click(function(e) { $('.navbar li').removeClass('active'); var $this = $(this); if (!$this.hasClass('active')) { $this.addClass('active'); } e.preventDefault(); }); }); But because the preventDefault i can't go to the link that i want. It just make the navbar active, but it's not go to the link that i choose. And here is the link code : <div class="nav-collapse collapse"> <ul class="nav"> <li><a href='<?php echo site_url(' tampilan ') ?>'>Knowledge Base</a> </li> <li><a href

Centered icons above / over / on top of text in Navbar? (Bootstrap 3)

允我心安 提交于 2019-12-03 09:08:05
I spent some time searching for a way to do this & tried a couple (close) examples without success. Example here I'm basically trying to put the little android icons centered above the "Sub#" text in the subnav. Any help would be appreciated. The area of the code is: <span class=""> <span>Sub1</span> <i class="fa fa-android fa-lg"></i> </span> You should wrap each of icons in col-xs-2 with a col-xs-offset-1 in the first div to make it centered. You can use <br> tags to create a line break between your icon and your text. JSFiddle Demo <div class="col-xs-offset-1 col-xs-2"> <i class="fa fa

Twitter Bootstrap: Collapse only certain menu items into drop-down

喜你入骨 提交于 2019-12-03 09:03:04
问题 I'm wondering how to create a Twitter Bootstrap navbar that collapses items in that menu, one or two items at a time upon resizing the browser window. Most navbars I've seen have collapsed the entire navbar into one drop-down; basically hiding everything on that navbar when the window is resized. But I need it to still reveal some menu items; so a partial collapse. Here's an example of what I mean (menu below): Home | About | Services | Order | Contact When the browser window is resized from

Changing Bootstrap's navbar opacity without affecting the buttons

余生颓废 提交于 2019-12-03 08:27:59
I only want my navbar buttons to be visible, while the actual bar that spans across the entire page has full opacity. Whenever I change the opacity of the navbar it affects the classes inside of it, even when I specify those classes to have no opacity. I've posted an image of what I'm trying to replicate. As you can see, the links appear in full, but the navbar is invisible, allowing the complete background image to show. It might look like a solid red bar, but I assure you it's an invisible navbar. Any help would be super appreciated! Thanks. Here's my navbar HTML code: <div class="custom_nav

use intro.js on bootstrap dropdown element

可紊 提交于 2019-12-03 04:36:07
I cannot figure out how to use intro.js on dropdown elements. I found a similar question with no answer there: IntroJS Bootstrap Menu doesnt work If you want to reproduce the error, follow these steps: http://recherche.utilitaire.melard.fr/#/carto You have to click on "Aide" (The green button on the top right), the problem occurs for the second step. on the change event, I do: $scope.ChangeEvent = function (e) { if (e.id === 'step2') { document.getElementById('step1').click(); } console.log("Change Event called"); }; When debugging, everything is working like a charm until that function end:

bootstrap amazon style search bar

一笑奈何 提交于 2019-12-03 03:34:17
Is there an easy way to do something similar to this in bootstrap? A search bar with a drop down selector for a different category? I've been looking through their documentation, something similar to this but with the dropdown being attached to the search bar is what I'm looking for. I want it to be part of my navbar. I recall seeing an example online but can't seem to find it now. Also wondering where it would go in relation to my header at the moment <header class="navbar navbar-fixed-top navbar-inverse"> <div class="navbar-inner"> <div class="container"> <nav> <ul class="nav pull-left"> <li

highlight menu on scrolling (if reach div)

白昼怎懂夜的黑 提交于 2019-12-03 01:56:46
i want highlight the menu point if the div is scrolled // or clicked. http://jsfiddle.net/WeboGraph/vu6hN/2/ (thats an example what i want) my code: (JS) $(document).ready(function(){ $('nav a').on('click', function(event) { $(this).parent().find('a').removeClass('active_underlined'); $(this).addClass('active_underlined'); }); $(window).on('scroll', function() { $('.target').each(function() { if($(window).scrollTop() >= $(this).position().top) { var id = $(this).attr('id'); $('nav a').removeClass('active_underlined'); $('nav a[href=#'+ id +']').addClass('active_underlined'); } }); }); }); my