This project is read-only.

Precise Controls... like a NinJa!

Har har, funny, right? Of course this framework provides a good amount of controls out of the box. These controls represent easy ways to do neat and useful things in HTML pages without a lot of overhead or set up involved.

In order to make using controls simple, NinJa adopts a class-based way of defining what tags will be turned into a specific control. This allows styling of the specific control via classes and does not force all tags to have a specific control. This also allows some combination of controls by simply including more than once class name.

Finally, custom attributes are used to define specifics of a control. 

These features pretty much mean you set a class name, a few attributes and that's it! No onload initializing or functions to call to get everything to work.

Working with Controls

All controls are hosted in separately linked .js files. The simple controls are found in the NinJaControls.js file and other, heavier controls are found in other specific files (such as NinJaGridView.js and NinJaMenu.js). All controls and can be created dynamically and created like any other object. All controls with child components can be accessed and modified as an array where modification will automatically refresh the control. Child components can also be created dynamically.

Finally,  all controls can be referenced with the standard reference function scheme, such as using $Calendar("my_cal") to access a calendar.


Accordion - Control for display single pieces of content at a time.

Last edited Jun 15, 2012 at 7:36 PM by dahrkdaiz, version 2


No comments yet.