Jump to content

Search the Community

Showing results for tags 'setInterval'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 3 results

  1. I'm playing a video and while it is playing I'm using setInterval to search for a string every second. This is working perfectly. When I pause the video then I want the search loop to stop, but it's not stopping with the clearInterval command. What am I doing wrong here? I'm stumped. Thanks, Andrew // ------------ PLAY PAUSE ------------ function playPause() { if (vvid.paused) {vvid.play(); var vInterval = setInterval(function() { findWord(); }, 1000); findWord(jQuery('#findWord').val()); } else { vvid.pause(); clearInterval(vInterv
  2. Good day, I appreciate that this is a popular query but I've been searching the web for answers and I've been unable to get my code to work. I'm trying to create the effect of an animated button on a website. I have a div which contains an <img/>. This image is the "animated button". I have already prepared the additional images to represent the following frames. Now, the JavaScript code I have (which I've pulled together looking at examples) is below. var navAniButton;var aniImgs;var imgAniTimer;var index;var maxImages; function updateVar() {navAniButton = document.getEleme
  3. var timer;function func(){timer = setInterval(function(){ alert("message..."); // Any difference from without clearInterval(timer)??? clearInterval(timer);// func(); },5000);}window.onload = func; See the comment above, please.I've tested it. It seems no difference at all.But to the best I know, a setInterval without a clearInterval will eventually run after the previous interval, thus producing endless running of the codes and a crash, eh? Thanks in advance.
×
×
  • Create New...