Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Koken 0.8.4
  • ContentBox 1.5.2
  • jQPlayer 0.5.2
  • SPOILER ALERT! 0.0.2
  • jQuery Mask Plugin 0.9.0
  • Easing Slider 2.1.2
  • Btapp.js 0.2.0
  • WiiFlash 0.4.5
  • Breeze.js 1.3.3
  • TinyMCE Templates 3.0.2
  • Home > Scripts > Modules > jQuery Plugins

    jQuery timers 1.2

    download button


    Downloads: 2,817  Tell us about an update
    User Rating:
    Rated by:
    Good (3.0/5)
    21 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    jquery.offput.ca | More scripts
    jquery.offput.ca
    Other Free / Open Source License - WTFPL License 

    Windows / Linux / Mac OS / BSD / Solaris
    N/A
    JavaScript
    February 11th, 2011, 02:54 GMT
    C: \ Modules \ jQuery Plugins

     Read user reviews (0)  Refer to a friend  Subscribe

    jQuery timers description

    jQuery timers will produce a friendlier and more intuitive timed event system

    jQuery timers is an attempt to combine jQuery's concise chaining programming style with a style in which timed events are coded in JavaScript to produce a friendlier and more intuitive timed event system.

    In addition, it fixes the most prevalent issue with the various event systems of JavaScript: misconfigured scope.

    All the methods you design to use in setTimeout/setInterval in JavaScript cannot use 'this' to reference the desired element because 'this' always references the window object.

    Because of this, closures are required to produce useful code. Without the need for closures, these methods could be stored inside the class rather than inside the calling method which would produce a more modular and object oriented style of coding.

    Here are some key features of "jQuery timers":

    · Abstracted Timer IDs - When you call setTimeout or setInterval with the intention of possibly stopping it later on you need to save the reference to the timer id. This is really cumbersome especially when you want loosely coupled activation deactivation of events. This plugin fixes that by storing the timer id internally and using it behind the scenes when stopping events.
    · Labelled Events - When you create a timed event, you have the option of giving it a label. These labels allow for multiple timed events to operate on the same object with fine control over which method you want to stop.
    · Limited Events - Beyond simply running once in a given amount of time and running every given amount of time, sometimes there is a need to run at a given time interval but only for a certain number of times.
    · Intelligent Event Belay - Sometimes when you have an event which is supposed to run every 500 milliseconds but every so often the function the event calls happens to take 600 milliseconds. jQuery timers lets you belay an instance of the event if the previous event is still running. This is disabled by default.
    · String Time Parsing - Too often, people try to use setTimeout or setInterval to do something every second but forget that they both take milliseconds. jQuery timers allows you to specify your time as a string. It include the SI prfixed time values for 'ms', 'cs', 'ds', 's', 'das', 'ws', and 'ks' which may be overkill but because milliseconds and seconds were already being added, the others were trivial to implement.

    Requirements:

    · JavaScript enabled on client side
    · jQuery JavaScript Library



    TAGS:

    timed event system | time management | javascript library | timed | event | system

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM