Jump to content

Search the Community

Showing results for tags 'clearInterval'.



More search options

  • 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 2 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(vInterval); } }
  2. 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...