Click here to Skip to main content

JavaScript

 
AnswerRe: Convert HTML to PDF (Client Side) PinmemberPhanindra26118-Dec-12 18:50 
GeneralRe: Convert HTML to PDF (Client Side) PinmemberJ4amieC18-Dec-12 22:29 
QuestionCan't figure out why the currentSlide goes 0-3-2 Pinmemberjkirkerx16-Dec-12 13:08 
AnswerRe: Can't figure out why the currentSlide goes 0-3-2 Pinmemberjkirkerx17-Dec-12 9:40 
OK I get it now. The Javascript runs full speed until complete, but the delay in the animation function drags behind the execution of the code, so You can never really detect the end of the animation loop.
 
So for now, I'll just loop through some marketing messages, and then stop
 
I put a for loop in the function instead
 
function animate() {
 
        for (var i = 0; i < slideTotal - 1; i++) {
 
            $(slidesHolder).css({
                'left': '0px'
            });
 
            $(slidesHolder).delay(delay).animate({
                "left": "-=" + slideWidth
            }, slideTime, 'swing', function () {
                //Animation Complete - do something

            });
        }
    }
 

AnswerSo I rewrote the program from scratch, works pretty good now, feel free to build on it Pinmemberjkirkerx19-Dec-12 18:45 
GeneralRe: So I rewrote the program from scratch, works pretty good now, feel free to build on it PinmvpRichard MacCutchan20-Dec-12 0:15 
GeneralRe: So I rewrote the program from scratch, works pretty good now, feel free to build on it Pinmemberjkirkerx20-Dec-12 7:18 
GeneralRe: So I rewrote the program from scratch, works pretty good now, feel free to build on it PinmvpRichard MacCutchan20-Dec-12 7:39 
QuestionJava Script Pinmembermanoj s sherje14-Dec-12 2:05 
QuestionRe: Java Script PinmemberProgramFOX14-Dec-12 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 25 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid