Ariel Flesler

Sunday, July 27, 2014

This blog is officially closed

It's been quite some years since I last posted on this blog. At some point the amount of daily inquires in the comments became overwhelming for the time I had available so I locked them.

If someone has a doubt or an issue with a plugin I'd advice you to ask on sites like StackOverflow.
If you think you found a bug or have a feature request feel free to create an issue on the appropriate project on Github. I try to reply fast but there's no guarantee.

Saturday, June 6, 2009

Google Code

I decided to move my plugins from my private svn to Google Code. This means the code being developed is now public and can be viewed and reviewed by anyone.

I'm also trying to automate the building process with a makefile in order to make deploys less tedious (thus more frequent :)).

Everyone's invited to check the code, review it, comment and report bugs. The repository has a few plugins that I actually never released. It doesn't contain non-jQuery scripts yet. I haven't moved them yet and won't do yet.

Links

Saturday, May 30, 2009

Introduction

I never actually posted about 2 tiny plugins I made, once jQuery 1.3 was nearing.

Both are somehow related, they are related to Ajax (jQuery.ajax) and they provide sort of a manager to allow multiple implementations of the same feature.

Needless to say, both plugins only work under jQuery 1.3 or higher. The packages(zips) include jQuery 1.2.7pre because that's the version I used to test them when I made them. You obviously don't need to use that version.

XHR

Since jQuery 1.3. The default XHR "factory" function can be overriden by passing an 'xhr' setting to jQuery.ajax with a new function

This tiny plugin provides a simple registry for different xhr implementations to co-exist.

One or more dataTypes to handle. Can be any combination of ajax, html, json and xml separated by spaces.

The filter function. Will receive 2 arguments: the data and the type. The 'this' will reference the settings object.

To use it, you do:

jQuery.ajax({
url:'foo.html',
filter:'js_in_href',
// ...
});

The filter can also parse the response.
That means it can (for example) provide an alternative way of eval'ing json. This is specially useful for Adobe AIR apps.
If the filter returns something else than a string, it's assumed to be the final response.