Object ng vs. 1.1.0 Full+Lite

The Core of the NoGray JavaScript Library is the ng object. It contains general functions and properties that is commonly used.


Function ng.get (obj) vs. 1.1.0 Full+Lite
The ng.get(obj) method is used to return any HTML element (extended by the ng.Element class) or any custom object (such as a plug-in or component - if supported).
Function ng.create (tag, properties) vs. 1.1.0 Full+Lite
The create function will create an HTML element using the tag and any properties provided.
Function ng.ready (func) vs. 1.1.0 Full+Lite
Execute a function func when the dom is ready. Similar to the onload event but runs before all the images are loaded.
Function ng.on_ready (id, func) vs. 1.1.4 Full+Lite
This function will execute a function when an HTML element is ready. It's similar to the ng.ready function, but does not wait for the entire document.
Function ng.hold_html (ng.hold_html) vs. 1.1.4 Full+Lite
Append an HTML string to a hidden element in the document. This method can be used if you created HTML code for innerHTML and want to append it (not just write the innerHTML) inside an HTML element. This method will only apply the HTML code to the hidden element.
Object ng.browser vs. 1.1.0 Full+Lite
The browser object contain general information about the browser type and version.
Function ng.defined (obj) vs. 1.1.0 Full+Lite
Check if the object obj is defined or not, can check for a zero (ng.defined(0) is true).
Function ng.type (obj) vs. 1.1.0 Full+Lite
This function will return the object's type. However; instead if trying to figure every possible type in one place, it checks for the has_type property.
Function ng.random (start, end, not_in) vs. 1.1.0 Full+Lite
This function will generate a random number between the start and end. If an array is passed as the not_in parameter, the random number will not match any value from the array.
Function ng.random_id (str) vs. 1.1.0 Full+Lite
This function will generate a random id in the format ng_str_####_####
Function ng.extend (ObjA, ObjB) vs. 1.1.0 Full+Lite
This function will extend objA with objB properties (shallow extenssion).
Function ng.extend_proto (objA, ObjB) vs. 1.1.0 Full+Lite
This function works the same way as the ng.extend(objA, objB) function except it extends the object prototype.
Function ng.extend_event (evt) vs. 1.1.0 Full+Lite
Extends and event for easy use and cross browser supports. After the event is extended, the following properties will be avaliable.
Function ng.obj_each (obj, func, bind, args) vs. 1.1.0 Full+Lite
Iterate and execute a function over each object obj property. The function will receive the current value and the key plus any arguments passed to the each function.
Function ng.obj_merge (orig_obj, new_obj) vs. 1.1.0 Full+Lite
Merge the properties of an new object new_obj with the original object orig_obj. Any new properties from the new object will overwrite the original object properties.
Function ng.obj_clone (obj) vs. 1.1.0 Full+Lite
Will return a new clone of the object obj.
Function ng.html5_options (id) vs. 1.1.2 Full+Lite
Create an options object from the html5 data properties. This function allows all plugins and components to support html5.
Function ng.map_html5_prop (type, obj) vs. 1.1.2 Full+Lite
Map specific html5 properties to be used in the creation of the html5 options object in ng.html5_options.

API Menu