-
Notifications
You must be signed in to change notification settings - Fork 0
Queries the DOM using CSS selectors and returns an Element, or Array of Elements when not specifying an ID
@param {String} arg Comma delimited string of target #id, .class, tag or selector
@param {Boolean} nodelist [Optional] True will return a NodeList (by reference) for tags & classes
@return {Mixed} Element or Array of Elements
Example
var obj = $("#id"),
arr = $(".class");
abaaso is aliased onto $ for syntactic sugar (a$ in "no conflict" mode), making a sweet & short syntax
Creates an alias of an Object on another Object (getters & setters when supported).
@param obj {Object} Object to alias origin
@param origin {Object} Object providing structure to obj
@returns {Object} Object to alias origin
Example
abaaso.alias($, abaaso);
Name of global variable with syntactic sugar of abaaso.
Example
(function (global, abaaso) {
var $ = global[abaaso.aliased];
})(this, abaaso);
Alias of client.allows
Alias of el.create
Alias of el.clear
Clones an Object
@param {Object} obj Object to clone
@return {Object} Clone of obj
Example
var a = {indices: [1,2,3,4,5]},
b = $.clone(a);
Alias of el.create
Alias of el.css
Alias of json.decode
Defers the execution of Function by at least the supplied milliseconds
Timing may vary under "heavy load" relative to the CPU & client JavaScript engine
@param {Function} fn Function to defer execution of
@param {Number} ms Milliseconds to defer execution
@param {Number} id [Optional] ID of the deferred function
Example
$.defer(someFunction, 250);
Affords deep setting of properties without knowing if the structure is valid.
@param {String} args Dot delimited string of the structure
@param {Mixed} value Value to set
@param {Object} obj Object receiving value
@return {Object} Object receiving value
Example
var x = {};
$.define("some.nested.node", true, x);
Alias of client.del
Alias of el.destroy
Alias of json.encode
Error handling, with history in $.error.log
@param {Mixed} e Error object or message to display
@param {Array} args Array of arguments from the callstack
@param {Mixed} scope Entity that was "this"
@param {Boolean} warning [Optional] Will display as console warning if true
Example
$.error("Something went wrong");
Array of caught Errors as Objects with extended properties
Alias of client.expire
Cached URI garbarge collection timeout
Creates a class extending obj, with optional decoration
@param {Object} obj Object to extend
@param {Object} arg [Optional] Object for decoration
@return {Object} Decorated obj
Example
var extObj = $.extend(myObj, {newProperty: true});
Alias of observer.fire
Generates an ID value
@param {Mixed} obj [Optional] Object to receive id
@return {Mixed} Object or id
Example
var id = $.genId();
Alias of client.get
Generates a GUID
@param {Boolean} safe [Optional] Strips - from GUID
@return {String} GUID
Example
var guid = $.guid();
Alias of client.headers
Returns a Boolean indidcating if the Object is hidden
@param {Mixed} obj Element or $ query
@return {Mixed} Boolean indicating if Object is hidden
Example
var obj = $("#id");
if (typeof obj !== "undefined" && obj.isHidden()) obj.show();
abaaso
Iterates an Object and executes a function against the properties
Parameters for fn are value & key
@param {Object} obj Object to iterate
@param {Function} fn Function to execute against properties
@return {Object} Object
Example
$.iterate(myObj, function (val, key) { doSomething(val); });
Alias of client.jsonp
Alias of observer.list
Alias of observer.log
Merges obj with arg
@param {Object} obj Object to decorate @param {Object} arg Object to decorate with @return {Object} Object to decorate
Example
$.merge(myObj, newObj); // myObj will have the properties & values of newObj
Registers a module in the abaaso namespace
@param {String} arg Module name
@param {Object} obj Module structure
@return {Object} abaaso
Example
$.module("myClass", {…});
$.myClass.someFunction();
Returns Object, or reference to Element
@param {Mixed} obj Entity or $ query
@returns {Mixed} Entity
Example
function (arg) {
var obj = $.object(arg);
…
}
Alias of observer.add
Alias of client.options
Alias of client.permissions
Alias of el.position
Alias of client.post
Alias of el.prependChild
Alias of client.put
Returns an Object containing 1 or all key:value pairs from the querystring
@param {String} arg [Optional] Key to find in the querystring
@return {Object} Object of 1 or all key:value pairs in the querystring
Example
var qs = $.queryString();
Boolean indicating if abaaso is ready
Example
$.ready;
Returns an Array of parameters of a Function
Does not work on minified / obfuscated functions
@param {Function} arg Function to reflect
@return {Array} Array of parameters
Example
var result = $.reflect(someFunction);
Creates a timed recursive function
Return false from the function to halt recursion
@param {Function} fn Function to execute repeatedly
@param {Number} timeout Milliseconds to stagger the execution
@param {String} id [Optional] Timeout ID
@return {String} Timeout ID
Example
$.repeat(function () {
// repeating
…
if (something) return false;
}
Collection of timers
Transforms JSON to HTML and appends to Body or target Element
@param {Object} data JSON Object describing HTML
@param {Mixed} target [Optional] Target Element or Element.id to receive the HTML
@return {Object} Target Element
Example
$("#id").tpl({
h1: "Header",
p : "Content"
});
Alias of observer.remove
Alias of el.update
Version of abaaso
Example
$.version;