JavaScript bootstrap change navbar .active background color bootstrap change navbar color,bootstrap change navbar text color,bootstrap

I have a navbar in which I can't really see the .active color as I am using a 3rd party theme that I really like, but however I have one problem with the theme. I can't properly see which of my navbar items that is currently active. Therefore I want to add a background color to the .active element.

index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Test</title>
  <meta charset="utf-8">
  <!-- MOBILE FIRST -->
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- BOOTSTRAP -->
  <link rel="stylesheet" target='_blank' href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <!-- jQuery library -->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <!-- Latest compiled JavaScript -->
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

  <!-- THEMES -->
  <!-- <link target='_blank' href="css/theme_black.min.css" rel="stylesheet"> -->
  <!-- <link target='_blank' href="css/theme_white.min.css" rel="stylesheet"> -->

  <!-- HOMEMADE - these files are local --> 
  <!-- <script src="js/functions.js"></script> -->
  <!-- <link target='_blank' href="css/custom_style.css" rel="stylesheet"> --> 
</head>
<body>
<header id="header" class="header clearfix no-padding">
  <nav class="navbar navbar-default navbar-static-top">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" target='_blank' href="#">Test</a>
      </div>
      <div class="collapse navbar-collapse no-padding">
        <ul class="nav navbar-nav pull-right" id="navigator">
          <li id="home"><a class="border" target='_blank' href="#">Home</a></li>
          <li id="about"><a class="border" target='_blank' href="#">About</a></li>
          <li id="cv"><a class="border" target='_blank' href="#">CV</a></li>
          <li id="contact"><a class="border" target='_blank' href="#">Contact</a></li>
        </ul>
      </div>
    </div>
  </nav>
</header>
</body>

I am using the following code in my javascript to change the .active item

functions.js

$('#nav li a').click(function() {
  $('#nav li').removeClass();
  $($(this).attr('href')).addClass('active');
});

I do however want to change the background of the active item, and I have tried a couple of different solutions in my css, but none of them work as intended.

custom_style.css

.no-margin {
  margin: 0;
}

.no-padding {
  padding: 0;
}

//some sort of .active {
//  background-color: blue;
//}

EDIT:

Now with a fiddle: https://jsfiddle.net/819qbftg/2/

Answer:1

I'm using Kimono Labs to scrape data from a web page and create RSS output. Each item includes title, description and unique link. I want to use the feed as a trigger on IFTTT.com, but IFTTT requires ...

I'm using Kimono Labs to scrape data from a web page and create RSS output. Each item includes title, description and unique link. I want to use the feed as a trigger on IFTTT.com, but IFTTT requires ...

As the title says, I am trying to build a function where the user puts in an integer and gets an JavaScript alert if it's an Fibonacci number or not without hard-codeing, I have tried this so far and ...

As the title says, I am trying to build a function where the user puts in an integer and gets an JavaScript alert if it's an Fibonacci number or not without hard-codeing, I have tried this so far and ...

I've looked through stackoverflow for days, and none of the stuff I worked. Anyways, after an explosion and appending a submit button to my document the button doesn't alert when clicked. $(...

I've looked through stackoverflow for days, and none of the stuff I worked. Anyways, after an explosion and appending a submit button to my document the button doesn't alert when clicked. $(...

  1. submit button doesn't work
  2. submit button doesn't work php
  3. submit button doesn't work in chrome
  4. submit button doesn't work in internet explorer
  5. submit button doesn't work mvc
  6. submit button doesn't do anything
  7. html submit button doesn't work
  8. submit button doesn't work rails
  9. submit button doesn't run php
  10. submit button doesn't work symfony
  11. angular submit button doesn't work
  12. bootstrap submit button doesn't work
  13. mturk submit button doesn't work
  14. pdf submit button doesn't work in chrome
  15. form submit button doesn't work
  16. chrome form submit button doesn't work
  17. jquery validate submit button doesn't work
  18. adobe submit form button doesn't work
  19. yii2 submit button doesn't work

Create a link for all mobile devices that opens google maps with business location? <a href="geo:37.6894694,-121.000303">Google MAP</a> - This link goes to the location and redirect to ...

Create a link for all mobile devices that opens google maps with business location? <a href="geo:37.6894694,-121.000303">Google MAP</a> - This link goes to the location and redirect to ...

  1. create mobile link
  2. create deep link mobile
  3. create link to open mobile app
  4. create phishing link in mobile
  5. create download link in mobile