Click here to Skip to main content
       

JavaScript

 
AnswerRe: jquery tabslideout plugin and want to detect when div slide in and out Pinmembervbmike21-Dec-12 7:25 
GeneralRe: jquery tabslideout plugin and want to detect when div slide in and out PinmemberTridip Bhattacharjee23-Dec-12 7:35 
GeneralRe: jquery tabslideout plugin and want to detect when div slide in and out Pinmembervbmike23-Dec-12 12:31 
QuestionConvert HTML to PDF (Client Side) PinmemberPhanindra26116-Dec-12 21:07 
QuestionRe: Convert HTML to PDF (Client Side) Pinmemberryanb3118-Dec-12 6:05 
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 
I'm kind of baffled here. This is a script that came in a customer project. I thought I fixed it, but when I run it, the slide counter goes 0 then 3 then 2 instead of 0 1 2
 
$(document).ready(function () {
 
    var slideContainer = $('[id*="_slideshow_container"]');
    var slidesHolder = $(slideContainer).children();
    var slideWidth = $(slideContainer).width();
    var slides = $(slidesHolder).children();
    var slidePos = 0;
    var slideTotal = slides.length;
    var currentSlide = 0;
    var delay = 5000;
    var slideTime = 1000;
 
    $(slideContainer).css({
        "overflow": "hidden",
        "position": "relative"
    });
 
    $(slidesHolder).css({
        "position": "absolute",
        "top": "0px",
        "left": "0px"
    });
 
    for (var i = 0; i < slides.length; i++) {
        $(slides[i]).css({
            "position": "absolute",
            "top": "0",
            "left": slidePos + "px"
        });
        slidePos = slidePos + slideWidth;
    }
 
    $(slidesHolder).css('width', slidePos + slideWidth);
 
    $(slides).first().clone().css({
        "left": slidePos + "px"
    }).appendTo(slidesHolder);
 
    animate();
 
    function animate() {
 
        $('[id*="_lbl_SS_Collapse"]').text(currentSlide);
 
        $(slidesHolder).delay(delay).animate({
            left: "-=" + slideWidth
        }, slideTime, function () {
            if (currentSlide < slideTotal) {
                currentSlide++;
                animate();
            }
            else {
                $(slidesHolder).css({
                    "left": "0px"
                });
                currentSlide = 0;
                animate();
            }
 
        });
    }
});
 


AnswerRe: Can't figure out why the currentSlide goes 0-3-2 Pinmemberjkirkerx17-Dec-12 9:40 
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 
QuestionRe: Java Script Pinmemberryanb3118-Dec-12 6:06 
AnswerRe: Java Script Pinmembermanoj s sherje19-Dec-12 2:01 
AnswerRe: Java Script Pinmemberryanb3119-Dec-12 2:37 
AnswerRe: Java Script Pinmembervbmike19-Dec-12 5:28 
QuestionUsing datePicker to disable dates already selected PinmemberxnaLearner11-Dec-12 4:39 
Questionjquery tabslideout plugin and wired behavior PinmemberTridip Bhattacharjee9-Dec-12 22:13 
AnswerRe: jquery tabslideout plugin and wired behavior PinmemberMayor Daily17-Dec-12 5:22 
GeneralRe: jquery tabslideout plugin and wired behavior PinmemberTridip Bhattacharjee18-Dec-12 1:55 
QuestionNeed help understanding binding PinmemberSteve Bondy7-Dec-12 15:00 
QuestionText replace Pinmemberrakeshs3127-Dec-12 0:06 

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.1411023.1 | Last Updated 25 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid