Click here to Skip to main content
       

JavaScript

 
Question"&nbsp" problem in Javascript PinmemberBrianCampbellMCAD20-Dec-12 12:08 
QuestionRe: "&nbsp" problem in Javascript PinmvpRichard MacCutchan20-Dec-12 23:00 
AnswerRe: "&nbsp" problem in Javascript PinmemberBrianCampbellMCAD21-Dec-12 1:42 
GeneralRe: "&nbsp" problem in Javascript PinmvpRichard MacCutchan21-Dec-12 2:06 
AnswerRe: "&nbsp" problem in Javascript Pinmemberjkirkerx31-Dec-12 10:39 
Questionjquery tabslideout plugin and want to detect when div slide in and out PinmemberTridip Bhattacharjee20-Dec-12 3:54 
AnswerRe: jquery tabslideout plugin and want to detect when div slide in and out Pinmembervbmike21-Dec-12 6:25 
GeneralRe: jquery tabslideout plugin and want to detect when div slide in and out PinmemberTridip Bhattacharjee23-Dec-12 6:35 
GeneralRe: jquery tabslideout plugin and want to detect when div slide in and out Pinmembervbmike23-Dec-12 11:31 
QuestionConvert HTML to PDF (Client Side) PinmemberPhanindra26116-Dec-12 20:07 
QuestionRe: Convert HTML to PDF (Client Side) Pinmemberryanb3118-Dec-12 5:05 
AnswerRe: Convert HTML to PDF (Client Side) PinmemberPhanindra26118-Dec-12 17:50 
GeneralRe: Convert HTML to PDF (Client Side) PinmemberJ4amieC18-Dec-12 21:29 
QuestionCan't figure out why the currentSlide goes 0-3-2 Pinmemberjkirkerx16-Dec-12 12: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 8:40 
AnswerSo I rewrote the program from scratch, works pretty good now, feel free to build on it Pinmemberjkirkerx19-Dec-12 17:45 
GeneralRe: So I rewrote the program from scratch, works pretty good now, feel free to build on it PinmvpRichard MacCutchan19-Dec-12 23:15 
GeneralRe: So I rewrote the program from scratch, works pretty good now, feel free to build on it Pinmemberjkirkerx20-Dec-12 6:18 
GeneralRe: So I rewrote the program from scratch, works pretty good now, feel free to build on it PinmvpRichard MacCutchan20-Dec-12 6:39 
QuestionJava Script Pinmembermanoj s sherje14-Dec-12 1:05 
QuestionRe: Java Script PinmemberProgramFOX14-Dec-12 1:33 
QuestionRe: Java Script Pinmemberryanb3118-Dec-12 5:06 
AnswerRe: Java Script Pinmembermanoj s sherje19-Dec-12 1:01 
AnswerRe: Java Script Pinmemberryanb3119-Dec-12 1:37 
AnswerRe: Java Script Pinmembervbmike19-Dec-12 4:28 
QuestionUsing datePicker to disable dates already selected PinmemberxnaLearner11-Dec-12 3:39 
Questionjquery tabslideout plugin and wired behavior PinmemberTridip Bhattacharjee9-Dec-12 21:13 
AnswerRe: jquery tabslideout plugin and wired behavior PinmemberMayor Daily17-Dec-12 4:22 
GeneralRe: jquery tabslideout plugin and wired behavior PinmemberTridip Bhattacharjee18-Dec-12 0:55 
QuestionNeed help understanding binding PinmemberSteve Bondy7-Dec-12 14:00 
QuestionText replace Pinmemberrakeshs3126-Dec-12 23:06 
AnswerRe: Text replace PinmvpRichard MacCutchan7-Dec-12 0:43 
GeneralRe: Text replace Pinmemberrakeshs3129-Dec-12 5:40 
QuestionJQuery datePicker SelectMultiple format dd/mm/yy PinmemberxnaLearner6-Dec-12 0:37 
AnswerRe: JQuery datePicker SelectMultiple format dd/mm/yy Pinmembersrinivas nv6-Dec-12 21:50 
GeneralRe: JQuery datePicker SelectMultiple format dd/mm/yy PinmemberxnaLearner10-Dec-12 0:04 
QuestionDelete selected rows by table id using javascript PinmemberMember 88023075-Dec-12 8:05 
AnswerRe: Delete selected rows by table id using javascript PinmemberDeepak Kr15-Dec-12 18:45 
GeneralRe: Delete selected rows by table id using javascript PinmemberMember 88023076-Dec-12 6:20 
AnswerRe: Delete selected rows by table id using javascript PinmemberGraham Breach6-Dec-12 21:41 
QuestionHTML5 Javascript Issue [modified] PinmvpJohn Simmons / outlaw programmer3-Dec-12 1:09 
AnswerRe: HTML5 Javascript Issue PinmemberGraham Breach3-Dec-12 5:00 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 5:22 
GeneralRe: HTML5 Javascript Issue PinmemberGraham Breach3-Dec-12 6:29 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 6:40 
GeneralRe: HTML5 Javascript Issue PinmemberGraham Breach3-Dec-12 6:48 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 9:09 
GeneralRe: HTML5 Javascript Issue PinmemberGraham Breach3-Dec-12 11:02 
GeneralRe: HTML5 Javascript Issue PinmvpJohn Simmons / outlaw programmer3-Dec-12 15:20 
GeneralRe: HTML5 Javascript Issue PinmemberMedia2r18-Dec-12 0:51 

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
Web03 | 2.8.140926.1 | Last Updated 29 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid