title: how to add background color for menu items?
body: <pre><code>&lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-lg-3 col-md-3 col-sm-12 fl logo"&gt;
                  &lt;a href="#"&gt;&lt;img src="images/main-logo.png" alt="logo" /&gt; 
                  &lt;/a&gt;
              &lt;/div&gt;
              &lt;div class="mobile"&gt;
                      &lt;a id="mobile-menu" href="#"&gt;
                          &lt;div class="mob-bar"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
                      &lt;/a&gt;
               &lt;/div&gt;
              &lt;div class="col-lg-8 col-md-8 col-sm-12 right-nav" id="right-nav"&gt;
  
                  &lt;ul&gt;
                      &lt;li&gt;
                          &lt;a href="index.php"&gt;HOME&lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li&gt;&lt;a href="aboutus.php"&gt;ABOUT US&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="service.php"&gt;SERVICES&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="news.php"&gt;NEWS&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="contactus.php"&gt;CONTACT US&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
              &lt;div class="col-lg-1 col-md-1 fl right-3"&gt;
                  &lt;div class="fl search-icon"&gt;
                      &lt;a href="http://www.1008jobs.com/search/normal" target="_blank"&gt;&lt;i class="fa fa-search" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="slideouticons"&gt;
                      &lt;input id="togglebox" type="checkbox"&gt;
                      &lt;label for="togglebox" class="mainlabel"&gt;&lt;i class="fa fa-share-alt"&gt;&lt;/i&gt;&lt;/label&gt;
                      &lt;div class="iconswrapper"&gt;
                          &lt;ul&gt;
                          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-facebook" title="Facebook"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-twitter" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-google-plus" title="Google Plus"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-pinterest-p" title="Pinterest"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>These is my code. this code i have included in php file and calling this file to all pages. so how can i give background color for nav-items using jquery or javascript. if i am using .addclass to that a tag the page will reloading and script again starting as a existing level. so please some different ways to add that one.</p>