Examples
List of modules
-
Ace Editor
Affix
Alert
Audio
Button
Carousel
Char Counter
Color Picker
Data Table
Datepicker
Diagram Builder
Dropdown
Form Builder
Form Validator
I/O
Image Cropper
Image Viewer
Modal
Node
Pagination
Popover
Progress Bar
Rating
Scheduler
Scrollspy
Sortable Layout
Sortable List
Tabview
Timepicker
Toggler
Toolbar
Tooltip
TreeView
Video
Viewport
Node
Click the div
below to change its background color.
Click me!
<div id="toggleColor">Click me!</div>
// Create an AUI instance and load the 'aui-node' module
YUI().use(
'aui-node',
function(Y) {
// Select the node(s) using a css selector string
var node = Y.one('#toggleColor');
// Change the background color on a `click` event
node.on(
'click',
function() {
var randomColor = Math.floor(Math.random() * 16777215).toString(16);
node.setStyle('background', '#' + randomColor);
}
);
}
);