Timeline of content with jcarousellite

Asked

Viewed 51 times

1

I’m creating a timeline using jCarouselLite, but it’s a bug when I advance to a new decade. For example:

inserir a descrição da imagem aqui

In the gray arrows I can navigate to other dates, and in the colored jumps to another decade.

The bug would be the following: when I am in the decade (for example) of 80 and select some year (example: 1985), when I move to the next decade, I would like it to start in 1995 and not in 1990.

If I’m in 1982 and I advance a decade, I want it to start in 1992 and not 1990.

I will show in the example:

inserir a descrição da imagem aqui

And

inserir a descrição da imagem aqui

Follows a code part of my HTML code:

<div class="reconhecimento anos-80" id="ano-80">

  <ul>
    <li>
      <h2 class="oitenta">1980</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>
    </li>

    <li>
      <h2 class="oitenta">1981</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>    
    </li>

    <li>
      <h2 class="oitenta">1982</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>    
    </li>

    <li>
      <h2 class="oitenta">1983</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>    
    </li>

    <li>
      <h2 class="oitenta">1984</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>    
    </li>

    <li>
      <h2 class="oitenta">1985</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>    
    </li>
  </ul>
</div> <!-- reconhecimento -->

<div class="reconhecimento anos-90" id="ano-90">

  <ul>
    <li>
      <h2 class="noventa">1990</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>
    </li>

    <li>
      <h2 class="noventa">1991</h2>
      <a id="foto" href="files/timeline-80.png">
        <img src="files/timeline-80.png" />
      </a>    
    </li>

    <li>
      <h2 class="noventa">1992</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>    
    </li>

    <li>
      <h2 class="noventa">1993</h2>
      <a id="foto" href="files/timeline-80.png">
        <img src="files/timeline-80.png" />
      </a>    
    </li>

    <li>
      <h2 class="noventa">1994</h2>
      <a id="foto" href="files/timeline-70.png">
        <img src="files/timeline-70.png" />
      </a>    
    </li>

    <li>
      <h2 class="noventa">1995</h2>
      <a id="foto" href="files/timeline-80.png">
        <img src="files/timeline-80.png" />
      </a>    
    </li>
  </ul>
</div> <!-- reconhecimento -->

JS:

$("#ano-80").jCarouselLite({
  btnNext: ".anos-proximo",
  btnPrev: ".anos-anterior",
  circular: true

});

$("#ano-80").jCarouselLite({
  btnNext: ".anos-proximo",
  btnPrev: ".anos-anterior",
  circular: true

});


$("#ano-70").jCarouselLite({
  btnNext: ".anos-proximo",
  btnPrev: ".anos-anterior",
  circular: true

});

$("#ano-90").jCarouselLite({
  btnNext: ".anos-proximo",
  btnPrev: ".anos-anterior",
  circular: true

});
  • @Thanks for the feedback, I confess that I am not getting through the problem. I have to "zero" start the Carrousel when jumping to another decade. What’s happening is if I’m on the date 1985 and is going to skip to the next decade 90 the Carousel charges from the date 1995, and not from the date 1990. How the images show.

  • I tried to edit the question, if you have not improved you can reverse when you want to. I understand what you want to do, but do not know the plugin to formulate a response.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.