Go Back   Access World Forums > Apps and Windows > Web Design and Development

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-21-2014, 03:37 AM   #1
BlueIshDan
 
Join Date: May 2014
Posts: 1,122
Thanks: 155
Thanked 159 Times in 156 Posts
BlueIshDan is on a distinguished road
JQuery: increment not working. (Newby Stuff)

So tea instead of coffee this morning was a mistake!

I am sad to admit that a simple incrementation has me stumped. Haha!

Does anyone understand why my increment is not working correctly.

My attempt was to make the two adds locations traverse through the adds array.

The adds_bottom seems to display only 0 and 2 and the adds_right displays only 1.

PHP Code:
    var urls = [
            
"http://admin.csrwire.com/system/profile_logos/12774/original/wmt_logo_2.JPG",
            
"http://myfrugaladventures.com/wp-content/uploads/2010/07/target_logo.gif",
            
"https://cantire.taleo.net/careersection/theme/101/1334777976000/en/theme/images/CT_HorzW_Std_RGB.PNG"];
    
    var 
index 0;
    
    $(
"#adds_bottom img:first").attr("src"urls[index++]);
    $(
"#adds_right img:first").attr("src"urls[index++]);
    
window.setInterval(RotateAdds5000);

    function 
RotateAdds()
    {
        
        $(
"#adds_bottom img:first").hide("fast",
                function ()
                {
                    $(
"#adds_bottom img:first").attr("src"urls[index++]);
                });

        $(
"#adds_bottom img:first").show("fast");
        
        if (
index === urls.lengthindex 0;

        $(
"#adds_right img:first").hide("fast",
                function ()
                {
                    $(
"#adds_right img:first").attr("src"urls[index++]);
                });

        $(
"#adds_right img:first").show("fast");

        if (
index === urls.lengthindex 0;
    } 

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Blue's Age Poll:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Animated Sorting:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Mining File Directories:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GetSubFolders:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

GetFileLines:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

FindSimilarValues:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Move (Avoid moving objects game):
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
BlueIshDan is offline   Reply With Quote
Old 08-21-2014, 04:29 AM   #2
BlueIshDan
 
Join Date: May 2014
Posts: 1,122
Thanks: 155
Thanked 159 Times in 156 Posts
BlueIshDan is on a distinguished road
Re: JQuery: increment not working. (Newby Stuff)

Guess I got it with this...

PHP Code:
    var adds = ["#adds_right img:first""#adds_bottom img:first"]
    var 
urls = [
            
"http://admin.csrwire.com/system/profile_logos/12774/original/wmt_logo_2.JPG",
            
"http://myfrugaladventures.com/wp-content/uploads/2010/07/target_logo.gif",
            
"https://cantire.taleo.net/careersection/theme/101/1334777976000/en/theme/images/CT_HorzW_Std_RGB.PNG"];

    var 
urls_index 0;

    $(
"#adds_bottom img:first").attr("src"urls[urls_index++]);
    $(
"#adds_right img:first").attr("src"urls[urls_index++]);

    
window.setInterval(RotateAdds5000);

    function 
RotateAdds()
    {
        
adds.every(function (elementindex, array)
        {
            $(
element).hide("fast",
                    function ()
                    {
                        $(
element).attr("src"urls[urls_index++]);
                        if (
urls_index >= urls.lengthurls_index 0;
                    });

            $(
element).show("fast");
            return 
true;
        });
    } 
Thanks
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Blue's Age Poll:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Animated Sorting:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Mining File Directories:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GetSubFolders:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

GetFileLines:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

FindSimilarValues:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Move (Avoid moving objects game):
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
BlueIshDan is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] JQuery wont work :( BlueIshDan ASP and ASP.NET 2 08-08-2014 07:49 AM
Date increment is not working properly rammudali Forms 2 12-09-2012 01:17 AM
Autonumber increment not working lucy_maria Tables 9 07-07-2009 07:18 AM
Newby asking for help ZoZon General 0 12-08-2006 04:53 PM
Trying to use SQL WHERE stuff LIKE stuff command, Not working racemadnss Queries 3 05-19-2004 08:18 PM




All times are GMT -8. The time now is 08:01 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World