jQuery Plugin Roundup: sqrop, At Intervals

2010-02-09 00:00:00 +0000 by Alex R. Young

I want to start doing a semi-regular jQuery plugin roundup, seeing as
readers often send us in their work. It's like show and tell for grown
ups! Contact us if you want your plugins featured.


jquery.sqrop is written by Jacek Becela and uses CSS to make neat image thumbnails. This uses the CSS

which is useful because you can cut down unwieldy user-submitted images.

Usage looks like this:

$(document).ready(function () {
  $("img").load(function () { $(this).sqrop(123) })

At Intervals

I noticed Jacek has also written At
which provides a nicer
API for window.setInterval:

$("#widget").at_intervals(fn, { delay: 3000, name: "poll_messages") // calls fn(), then 3s delay, then fn() again, etc..

It's a simple plugin, but provides useful features like being able to
pause execution:

$("#widget").data("poll_messages").should_pause = true  // pauses execution
$("#widget").data("poll_messages").should_pause = false // resumes execution
$("#widget").data("poll_messages").should_stop  = true  // stops execution (calls clearInterval() internally)