Ever wanted to bind something to the layout rendering phase of an element in Javascript? This helps, by checking at a fixed interval if the size or position of an element have changed and, if so, firing the 'refresh' custom event. All one has to do is then bind to it.

Github page: https://github.com/Siderite/jGenerateRefresh
JQuery plugins page: http://plugins.jquery.com/node/9030

Example:
$(function() { 
$('#target').bind('refresh',{},someRefreshFunction);
$('#target').generateRefreshEvent(100); // every 100 milliseconds
});

Comments

Anonymous

Yea I'm looking for a plugin to do this with a header image, would be nice to check out an example before hand to make sure it fits.

Anonymous

Anonymous

Hi, thanks for your great plugin. An example somewhere would create more interest in this plugin I think.

Anonymous

Post a comment