Javascript
1. Overview
-
Ace's Javascript files are inside
assets/js/ace
folder.
-
They are later merged into
assets/js/ace.js
and assets/js/ace-elements.js
for production site using
Javscript builder tool
-
There is also
assets/js/ace-extra.js
used for saving/restoring values and cookie/localStorage functions
-
assets/js/ace-require.js
is also used in RequireJS example file at html/require.html
2. Ace demo functions
-
Ace's demo functions are inside
assets/js/ace/ace.js
which initialize a few variables and initiate some functionality
such as sidebar scrollbars, etc.
So it's optional and is not needed but most of the functionality is initiated by default in Ace's demo.
-
Ace demo function are inside "ace.demo.functions" object and some of them are listed as below:
basics
enableSidebar
handleScrollbars
dropdownAutoPos
...
-
ace.demo.init
calls above functions when document is ready! Or you can call only the ones you want!
3. RequireJS
-
RequireJS example shows how to use Ace's Javascript files.
-
You may need to initiate Ace's functions after RequireJS is loaded:
ace.demo.init(true)
-
Please see
html/require.html
and assets/js/ace-require.js
files for more info.