2 Replies - 490 Views - Last Post: 21 January 2016 - 02:13 PM

#1 Nicky24   User is offline

  • D.I.C Head

Reputation: 7
  • View blog
  • Posts: 93
  • Joined: 23-December 13

How to cycle through 5 different hashes automatically?

Posted 24 December 2015 - 06:12 PM

Hello everyone!
I am new to jQuery and I am having a problem with cycling through 5 hashes automatically.
I have need to access the following hashes:
  • #one
  • #two
  • #three
  • #four
  • #five

I need to set a timeout function too, so that I can have like 5 seconds between each hash, and also, if it reaches the final hash (#five) it has to reset to the first hash and start over...

I have tried doing it setting lots of conditions for window.location.hash and trying to set the hashes that way, but it didn't work.
Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: How to cycle through 5 different hashes automatically?

#2 ajwsurfer   User is offline

  • D.I.C Regular
  • member icon

Reputation: 21
  • View blog
  • Posts: 385
  • Joined: 24-October 06

Re: How to cycle through 5 different hashes automatically?

Posted 21 January 2016 - 02:04 PM

Are you trying to access an html page? with the html code looking like:
<ul>
  <li id='one'># one</li>
  <li id='two'># two</li>
  <li id='three'># three</li>
  <li id='four'># four</li>
  <li id='five'># five</li>
</ul>


Was This Post Helpful? 0
  • +
  • -

#3 astonecipher   User is offline

  • Enterprise Software Architect
  • member icon

Reputation: 3215
  • View blog
  • Posts: 12,098
  • Joined: 03-December 12

Re: How to cycle through 5 different hashes automatically?

Posted 21 January 2016 - 02:13 PM

Being secretive doesn't solve any issues. Why do you have to cycle and not just pull one? Why a timer between them?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1