Home  >  Article  >  Web Front-end  >  Jquery method to realize the effect of subway line indicator light sign_jquery

Jquery method to realize the effect of subway line indicator light sign_jquery

WBOY
WBOYOriginal
2016-05-16 16:11:441745browse

The example in this article describes the method of using Jquery to achieve the effect of subway line indicator lights. Share it with everyone for your reference. The specific analysis is as follows:

Friends who often take the subway must have observed that when the subway is running, the green indicator light keeps going back and forth from one direction to the other, and it does not stop until it reaches the station. I have always wanted to do this. Such effect. After careful consideration today, I finally got a clue, and it has produced some results. Although there are still areas for optimization, I will post the code first. However, there is something wrong with the code in the comment. When the last index is reached, the color is added again at index 0, but it does not start from index 0 after the second execution. Interested friends can improve it.

Copy code The code is as follows:




jquery subway line indicator





jquery indicator





  • 0

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

  • 11




I hope this article will be helpful to everyone’s jQuery programming.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn