jQAPI – Alternative jQuery Documentation

The jQuery documentation is great, very complete, nicely written and with a lot of examples and demos. The only thing that bugs me is the way we have to find the right documentation for what we search for. Try to search for the .is() function for example. Over 100 matches before the actual function I am looking for?!*) And it is a fixed layout which means even on my big screen I have to scroll all the way down and have to scan for it. There have to be a better way, obviously.

… and that’s where JQAPI comes in. Above that it’s also up-to-date, sporting the latest documentation (in contradiction to other, outdated sites).

Accessing data saved in the class property of DOM-elements with jQuery

Use of this plugin is not recommended anymore. Use data-* attributes and $.fn.data instead. This was a possible solution, a long time ago.

A few weeks ago former colleague Jurriaan wrote a PrototypeJS extension to accessing data stored within classes of HTML elements. Basically it comes down to assigning extra classes (classes such as gender_male for example, which represent a property and a value) on an element, which you then read/write via Jurriaan’s extension. As this way of assigning data is a technique I’ve been using too, I took the liberty of writing a jQuery blend of his script.

Continue reading “Accessing data saved in the class property of DOM-elements with jQuery”

jQuery.serializeAnything : Serialize anything (and not just forms!)

Code snippet I found somewhere in my archive: jQuery.serializeAnything() is a jQuery Extension that serializes any element you specify, in contrast to jQuery’s builtin serialize() function which is limited to serializing form elements only.

Continue readingjQuery.serializeAnything : Serialize anything (and not just forms!)”

Backdropping jQuery functions into PrototypeJS

One of the functions I use quite regularly when working with jQuery is .attr(). Right now – at work – I’m fiddling around in Prototype, and noticed I kept on writing .attr() which – quite evidently – doesn’t exist. Okay, I can use Prototype’s .readAttribute() and .writeAttribute() but that’s quite a hassle: I want one function to set and get attributes, just as jQuery offers. Time to extend Prototype with some jQuery functionality 😉

Continue reading “Backdropping jQuery functions into PrototypeJS”