HelperJS



Overview

If you're using Hubble's JavaScript, one of the components you will use the most is the HelperJS library. The library is used throughout the framework internally and is very useful. It is similar in jQuery although it does not return a node or nodelist wrapped around an object.

To access the library, use the JSHelper key via the module loader:



Once you have access to library you can call it's methods. For example to select a node, use $.



The $All method returns an array of nodes (or an empty array if they couldn't be selected).



Then you could add a class.



Overview

Here are the available methods. Most of this is pretty self explanatory but if you're stuck please take a look at the source code.

Event Helpers




DOM Helpers




String Helpers




Array Helpers




Misc Helpers