where do i pass the index parameter ?

where do i pass the index parameter ?

hey guys i have the following HTML : 

  1. <nav class="product-nav">
  2. <ul class="nav-list-holder">
  3. <li><a href="#overview" class="active">History</a></li>
  4. <li><a href="#quality">Quality</a></li>
  5. <li><a href="#offerings">Offerings</a></li>
  6. </ul>
  7. </nav>
and the following Jquery code : 

  1. $jobslist = $('.nav-list-holder a');
  2.              
  3.             $($jobslist).on('click', function(e ){
  4.                   // var $(me) = $(this); 
  5.               e.preventDefault();
  6.               var newcontent = $(this).attr('href');

  7.               if(!$(this).hasClass('active')) {
  8.                 $('.nav-list-holder a.active').removeClass('active');
  9.               }
  10.               $(this).addClass('active');
  11.                
  12.               if(!$(newcontent).hasClass('displayed')) {
  13.                 $('.tab.displayed').removeClass('displayed');
  14.                 $(newcontent).addClass('displayed');
  15.               }

  16.                    var loc = $('.nav-list-holder a').eq(index);
  17.                    console.log(loc); 

  18.             });
my last line of code I.E. 

  1. console.log(loc); 
throws an error , ReferenceError: index is not defined . 

obviously , i am passing index anywhere as a parameter , where do i need to pass the index parameter , so that in the console.log(index); i can print out the correct index ??