FxQueues update: now compatible with jQuery 1.3.1

For all FxQueues plugin users, I just pushed a new version (2.0.3) that is only compatible with jQuery 1.3.x, since many tests and the main example under 2.0.2 weren’t working with jQuery’s latest version.

So if you are using jQuery 1.3.1, you should be using FxQueues 2.0.3, otherwise you can stick to 2.0.2, as only internal changes have been done and there are no new features.

jQuery Object Cache Update

After discussing with Andrew Luetgers some improvements that could be done to the Object Cache plugin, I updated the plugin to a new version.

The new improvement is that now you can store a selection automatically:

// Will store in cache $("#sidebarNav") with #sidebarNav key
$$("#sidebarNav");

This will let you avoid doing $(“#menu”).cache(“menu”), which is a bit redundant. Now by doing $$(“#menu”) you will be able to store it in the cache and retrieve it automatically. There is also a reload option that you can pass to that call in order to, well, reload the the cached object with that selection:

// Will reload #sidebarNav with $("#sidebarNav")
$$("#sidebarNav", true);

You can grab the new version of the Object Cache plugin here.

New jQuery plugin: Object Cache

Inspired by Benjamin Sterling’s “Better jQuery Code” article I decided to develop a simple plugin to make his first point (Caching) easier… nothing fancy, just a few methods, but you will hopefully find it useful.

Its objective is to let you store a jQuery object with a simple key in a global cache,
so that you can access the same object easily, without having to write the same selection, filtering or traversing code (i.e: $(“#main > p”) or $(“#main”).children(“.selected”).eq(0)).

Here is how it works:

// Store in cache - Returns current object
$("#mainNav").cache("main_navigation"); 
 
// Retrieve from cache - Returns cached object
$$("main_navigation"); // or jQueryCache("main_navigation");
 
// Remove from cache 
$$.remove("main_navigation");
 
// Clear Cache 
$$.clear();
 
// Load jQueryCache with noConflict to avoid overriding window.$$
$$.noConflict();

There is a lot of room for improvement, which will be done depending on the feedback I get, so feel free to contact me with any ideas or corrections you might come up with.

You can get the Jquery Object Cache plugin here.

Next Page »

  • About

    I'm a 22 years old web developer from Buenos Aires, Argentina. I am currently not available for freelance work, but feel free to get in touch with me, below are some ways to do it.

  • Contact me

    • e-mail:
    • skype: lucianopanaro
    • messenger: