Solved

Code to amend this JQuery simpleSli.de script to auto slide

Posted on 2010-11-19
6
1,054 Views
Last Modified: 2012-05-10
Hi,

please look at this example on the simplesli.de website:

http://www.simplesli.de/examples/fullpage.html

I've tried adding auto-slideshow with no success and wondered if someone can alter the code on the above fullpage.html example to autoslide the images?

Thanks
0
Comment
Question by:sany101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 34172049
Well, without digging into the code too much, it looks like you just need to call "resizer();" to make it move:
   setInterval('resizer();', 10000);     // auto slide every 10 seconds

Open in new window

0
 

Author Comment

by:sany101
ID: 34172153
Thanks Carl,

It says you need to add code below but not sure I'm getting this right as it's not working for me.




<div class="auto-slider" rel="group"></div>

// Add this javascript, and ensure it appears after the simpleSlide() call

$('.auto-slider').each( function() {
    var related_group = $(this).attr('rel');

    window.setInterval("simpleSlideAction('.right-button', " + related_group + ");", 4000);
});

Open in new window

0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 34172175
Where are you putting that code?
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:sany101
ID: 34172278
Tried in the header under

var timer = '';


I've also added the class auto-slider to the Div containing the images but not sure that's the right place for it.
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 34172448
For quick and easy cheat change:
<div class="right-button" rel="this_particular_slideshow">&gt;</div>

Open in new window

To:
<div id="right-button" class="right-button" rel="this_particular_slideshow">&gt;</div>

Open in new window

And add the following to the Head section, right before the closing </script> tag:
setInterval('document.getElementById(\'right-button\').click();', 10000);

Open in new window

0
 

Author Closing Comment

by:sany101
ID: 34173216
Perfect thanks
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Use "if not" in a condition 2 19
what should i learn? javascript or typescript? 3 41
Saving Web Page as PDF 9 49
Javascript: Mouseup doesn't follow mousedown 13 37
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question