Q: jQuery Click the random anchor tag from the series of tags I have five anchor tags. I want to make a loop in which after every 5 sec next random tag should be clicked using Jquery. it should be unlimited.

Here is my Html code.
<ul class="nav-tabs-slideshow">
            <li><a href="#panel-1"><strong>Study with umdc</strong><br />
                <span>Study Hard. Play Hard</span>
                </a>
            </li>
            <li>
                <a href="#panel-2"><strong>Messages</strong><br />
                <span>We prepare you to wild world</span>
                </a>
            </li>
            <li>
                <a href="#panel-3"><strong>Vision & Mission</strong><br />
                <span>Discovery &amp; Innovation</span>
                </a>
            </li>
            <li>
                <a href="#panel-4"><strong>Newsroom</strong><br />
                <span>Latest campus news update</span>
                </a>
            </li>
            <li>
                <a href="#panel-5"><strong>Events</strong><br />
                <span>Schedule of our activity</span>
                </a>
            </li>
        </ul>

Every kind of Help will be appreciated. 

A: // For Random Click


jQuery(document).ready(function(e) {
  
  
  
  
  jQuery(document).on({
   mouseenter: function () {
    jQuery('.nav-tabs-slideshow').addClass('mouseenter1');
   },
 
   mouseleave: function () {
    jQuery('.nav-tabs-slideshow').removeClass('mouseenter1');
   }
  }, '.nav-tabs-slideshow');
  
  setInterval(function(){
   
   if(!jQuery('.nav-tabs-slideshow').hasClass('mouseenter1')){
    click1 = Math.floor((Math.random() * jQuery('.nav-tabs-slideshow li').length));   console.log(click1);// for Check
    jQuery('.nav-tabs-slideshow li:eq( '+click1+' ) a').trigger('click');
    jQuery('.nav-tabs-slideshow li:eq( '+click1+' ) a').css({'color':'red'});
   }
    
   
  },1000);
        
    });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="nav-tabs-slideshow">
      <li><a href="#panel-1"><strong>Study with umdc</strong><br />
        <span>Study Hard. Play Hard</span> </a> </li>
      <li> <a href="#panel-2"><strong>Messages</strong><br />
        <span>We prepare you to wild world</span> </a> </li>
      <li> <a href="#panel-3"><strong>Vision & Mission</strong><br />
        <span>Discovery &amp; Innovation</span> </a> </li>
      <li> <a href="#panel-4"><strong>Newsroom</strong><br />
        <span>Latest campus news update</span> </a> </li>
      <li> <a href="#panel-5"><strong>Events</strong><br />
        <span>Schedule of our activity</span> </a> </li>
    </ul>




jQuery(document).ready(function(e) {
  
  var click1 = 0;
  setInterval(function(){
   if(jQuery('.nav-tabs-slideshow li').length == click1)
   {
    click1 = 0; 
   }   
   jQuery('.nav-tabs-slideshow li:eq( '+click1+' ) a').trigger('click');
   jQuery('.nav-tabs-slideshow li:eq( '+click1+' ) a').css({'color':'red'});// this is only for demo
   click1 ++; 
   
  },5000);
        
    });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ul class="nav-tabs-slideshow">
  <li><a href="#panel-1"><strong>Study with umdc</strong><br />
    <span>Study Hard. Play Hard</span> </a> </li>
  <li> <a href="#panel-2"><strong>Messages</strong><br />
    <span>We prepare you to wild world</span> </a> </li>
  <li> <a href="#panel-3"><strong>Vision & Mission</strong><br />
    <span>Discovery &amp; Innovation</span> </a> </li>
  <li> <a href="#panel-4"><strong>Newsroom</strong><br />
    <span>Latest campus news update</span> </a> </li>
  <li> <a href="#panel-5"><strong>Events</strong><br />
    <span>Schedule of our activity</span> </a> </li>
</ul>


