Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Javascript Slideshow Won't Loop

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #248229
    wristcutter69
    Participant

    Hi everyone.
    I just did my very first javascript and even though it works like I want it to, it won’t loop for some odd reason that I can’t explain, if anyone could somehow fix my code or give me an explanation why it doesn’t work and what can I do, it will be of great help!

    (Plus it’s not really necessary but if someone could tell me how I can make a fancy transition with opacity between the pictures it would be a huge help for me).

    Here is how I implemented it:

    See the Pen eBRabp by hell nino ( @wristcutter69) on CodePen.

    <script async src=”https://production-assets.codepen.io/assets/embed/ei.js”></script&gt;

    #248231
    bearhead
    Participant

    It looks like you just misspelled “length” on line 12 of your js:

    if (imageIndex>=imageArray.lenght) {
        imageIndex=0;
        }
    
    #248233
    wristcutter69
    Participant

    Holly crap!
    Something so simple to fix, and I was getting all paranoid thinking there was something terribly worng with my code.
    Thank you bearhead! I really mean it, you’ve been a huge help for me!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design’ is closed to new topics and replies.