Wednesday, December 10, 2008

Timed Event jQuery plugin documentation

In the previous post I wrote about Timed Event jQuery plugin. Here is documentation for it.


In order to use Timed Event, you must follow these steps:

  1. Download plugin arhcive and unpack it.
  2. Include jQuery and plugin file (jquery.timed-event.js or jquery.timed-event-min.js) to your web page.
  3. Now you can use Timed Event in your code. Use it in this way:
    $("selector").timedBind("event-type", {delay: [time of delay in milliseconds], buffer: [time of buffer in milliseconds]}, function() {
        //event handler function
    As you can see, timedBind accepts the same parameters as jQuery native bind function. But you should take into account that the data parameter in bind function is optional, but is required in timedBind function (in other words, all three parameters of timedBind are required). You can pass an empty object as data parameter, but in this case the behaviour of the timedBind will not differ from bind method. Both properties of data object(delay and buffer) are optional, you can pass any combination of them.


If you have some suggestions on improvement the plugin, feel free to email me at Kadalashvili at Vladimir at gmail dot com.



blinds said...

Nice work. Thanks.

How would the code be, if I'd like to show an animation 3sec after the page is loaded?

blinds said...

Got it!

$(window).timedBind("load", {delay: 3000}, function(){

'top': '30px',
'left': '1020px'
}, 500);

blinds said...

for line:

return function(e) {, e);};

IE7 says "target is null or not an object"

In my copy as well as on your demo page

Matt said...

Thanks for the plugin. It works fine in Firefox and Safari, but not in IE7. I'm not sure why as I don't get any error messages, it simply doesn't do anything. This applies to the demo page as well, so I don't think it's something in my code. Any ideas?