title: fill <li> background using href link inside it
body: <p>I want to apply a class to the <code>&lt;li&gt;</code> but i do not seem to find any way to do it.</p>
  
  <p>here is my html.</p>
  
  <p><strong>html markup:</strong></p>
  
  <pre><code>&lt;nav class="topNav"&gt;
       &lt;ul&gt;
            &lt;li id="bannera" onclick="clickOnli(href='#banner')"&gt;
                  &lt;a href="#banner"&gt;Notify&lt;img src="images/news-feed.png" class="topNavImages navNewsPic"&gt;&lt;/a&gt;
            &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p><strong>jquery:</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function()
      {
          var aChildren = $("nav li").children();
          var aArray = [];
          for (var i=0; i &lt; aChildren.length; i++)
          {    
              var aChild = aChildren[i];
              var ahref = $(aChild).attr('href');
              aArray.push(ahref);
          }
  
          $(window).scroll(function()
          {
              var windowPos = $(window).scrollTop() + $(window).height()/1.5;
              var windowHeight = $(window).height();
              var docHeight = $(document).height();
  
              for (var i=0; i &lt; aArray.length; i++)
              {
                  var theID = aArray[i];
                  var divPos = $(theID).offset().top;
                  var divHeight = $(theID).height();
  
                  if (windowPos &gt;= divPos)
                  {
                      $('a').removeClass("fillBlue");
                      $("a[href='" + theID + "']").addClass("fillBlue");
                  }
              }
  
              if(windowPos + windowHeight == docHeight)
              {
                  if (!$("nav li:last-child a").hasClass("fillBlue"))
                  {
                      var navActiveCurrent = $(".fillBlue").attr("href");
                      $("a[href='" + navActiveCurrent + "']").removeClass("fillBlue");
                      $("nav li:last-child a").addClass("fillBlue");
                  }
              }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I need to fill the li background not <code>&lt;a&gt;</code>link/tag background. How do i change this <code>$("a[href='" + theID + "']").addClass("fillBlue");</code> so that i can fill this ID's li background.</p>
  
  <p>any help would be greatly appreciated.</p>