Solved

JavaScript Slideshow Break Delay

Posted on 2011-02-17
2
234 Views
Last Modified: 2012-05-11
Hello Experts,

I have a limitted javascript knowledge, but applying what i know and using my VBScript expirience, i've built a javascript slideshow with DIVs at https://www.mylocaladvantage.com/home.asp where if your mouse is not hovered within the recxtengal, the deal changes every 5 seconds.

My question is, when you click on a orange rectange at the bottom in order to skip to a specific deal, it takes a while.  How can I make it jump immidiately?

My assumption is that whn the orange rectangle is clicked, that event is queued, but does not execute until the timer stops and function ends.  If i'm correct, then how can i stop all process?  

Thanks.
0
Comment
Question by:APD_Toronto
2 Comments
 
LVL 8

Accepted Solution

by:
imantas earned 500 total points
Comment Utility
It looks like that you need to replace your links like this:
<a class="opacityit" href="javascript:secs=0;StopTheClock();InitializeTimer(1);">
  <img id="NO1" src="images/numbered_boxes.jpg" width="65" height="28" style.filter="alpha(opacity=100)" style="">
</a>

Open in new window


to the ones that would look like:
<a class="opacityit" href="javascript:(function() { secs = 0; slideNo = 1; StartTheTimer(); })();">
  <img id="NO1" src="images/numbered_boxes.jpg" width="65" height="28" style.filter="alpha(opacity=100)" style="">
</a>

Open in new window


Please not the "javascript:..." part changed.
Do this for all 10 links that should change the slide and maybe that'll help. It worked in Opera, not sure about the other browsers.
0
 

Author Closing Comment

by:APD_Toronto
Comment Utility
sorry for tthe delay.  Thank you
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now