jQuery
1
Code Link 1 Source Documentation:
jQuery.fn.customFunction = function(parameter){
this.css({
"background": parameter.color,
"border": parameter.border
});
};

$("#id").customFunction({
color: "red",
border: "3px blue solid"
});
MooTools
1
Code Link 1 Source Documentation:
Element.implement({
customFunction: function(parameter){
this.set("styles", {
background: parameter.color,
border: parameter.border
});
}
});

$("id").customFunction({
color: "red",
border: "3px blue solid"
});
The Dojo Toolkit
1
Code Link 1 Source Documentation:
dojo.extend(dojo.NodeList, {
customFunction: function(parameter){
this.style({
"background": parameter.color,
"border": parameter.border
});
}
});

dojo.query("#id").customFunction({
color: "red",
border: "3px blue solid"
});
Prototype / Script.aculo.us
1
Code Link 1 Source Documentation:
Element.addMethods({
customFunction: function(e, parameter){
$(e).setStyle({
"background": parameter.color,
"border": parameter.border
});
}
});

$("id").customFunction({
color: "red",
border: "3px blue solid"
});
Ext JS
1
Code Link 1 Source Documentation:
Ext.override(Ext.Element, {
customFunction: function(parameter){
this.setStyle({
"background": parameter.color,
"border": parameter.border
});
}
});

Ext.get("id").customFunction({
color: "red",
border: "3px blue solid"
});
Adobe Spry
1
Code Link 1 Source Documentation:
Spry.$$.Results.customFunction = function(parameter){
return this.setStyle(
"background:" + parameter.color + ";" +
"border:" + parameter.border + ";"
)
};

Spry.$$("#id").customFunction({
color: "red",
border: "3px blue solid"
});
BBC Glow
1
Code C Link 1 Source Documentation:
customFunction = function(parameter){
glow.dom.get(parameter.object)
.css("background", parameter.color)
.css("border", parameter.border);
};

customFunction({
object: "#id",
color: "red",
border: "3px blue solid"
});
Yahoo! UI Library
1
Code Link 1 Source Documentation:
Y.Node.prototype.customFunction = function(parameter){
this.setStyles({
background: parameter.color,
border: parameter.border
});
};

Y.one("#id").customFunction({
color: "red",
border: "3px blue solid"
});

 Matthias Schütz - Media Designer / Web Designer / Developer / Freelancer