JavaScript

Useful JavaScript utilities

The javascript utilities are a set of javascript functionalities that we are using to develop Axentix.
We decided to provide them publicly to help you while developing with Axentix.

Axentix.extend()

The Axentix.extend() function allows you to overwrite an object by another one.
Here is an example :

Axentix.createEvent()

You can create your own events with the Axentix.createEvent() function. The Axentix events are automatically prefixed by ax.

Axentix.wrap()

The Axentix.wrap() function allows you to wrap multiple elements inside another one.
The default tag is a <div>.

If you want to change the default tag to a specific one, you can specify it as second parameter of the Axentix.wrap(elems, tagName) function.

Axentix.unwrap()

The Axentix.unwrap() function allows you to unwrap any element.
This means you can pop out an element who was wrapped in another one.