Showing posts with label jquery. Show all posts
Showing posts with label jquery. Show all posts

2010-11-21

jQuery Boids (Plugin)

From the README:

"My first attempt making a jQuery plugin, following the guidelines at: http://docs.jquery.com/Plugins/Authoring

Boids code adapted from Javascript Boids by Ben Dowling, see: http://www.coderholic.com/javascript-boids/

If this is bound to the window resize event, then the jQuery resize event plugin by "Cowboy" Ben Alman should be used as it throttles the window resize events. See: http://benalman.com/projects/jquery-resize-plugin/"

The plugin uses HTML Canvas to render the Boids, so a modern browser with Canvas support is required for this to work. I tested with Chrome, Safari and Firefox. IE with Excanvas was painfully slow…

Code is hosted at GitHub: https://github.com/kahara/jQuery-Boids

Demo is at: http://jonikahara.com/lab/jQuery-Boids/test.html

2007-10-22

Refer to the containing object in the jQuery callback function

From a Learning jQuery post by Mike Alsup:
...
var self = this;

$('#myElement').click(function() {
  // here you can use 'self' to reference
  // the enclosing object
});
...
Duh!

2007-10-11

Glyphix jQuery Plugins

They provide jquery.xslTransform, "a jQuery wrapper for Sarissa, providing the ability to replace any element on the fly (using the browser's built-in XSLT engine) with the results from an XSLT transformation of an XML document." For example:

$('your-selector-here').getTransform('path-to-xsl.xsl','path-to-xml.xml');".

Sweet, looks as simple as it possibly could get. Requires jquery.debug and Sarissa.

2007-10-10

jQuery JavaScript library

"..a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages."

Some dude Simon Willison has a nice overview.

Another one from developerWorks.