initial commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Name: UI Elements / Nestable - Examples
|
||||
Written by: Okler Themes - (http://www.okler.net)
|
||||
Theme Version: 2.1.1
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
Update Output
|
||||
*/
|
||||
var updateOutput = function (e) {
|
||||
var list = e.length ? e : $(e.target),
|
||||
output = list.data('output');
|
||||
|
||||
if (window.JSON) {
|
||||
output.val(window.JSON.stringify(list.nestable('serialize')));
|
||||
} else {
|
||||
output.val('JSON browser support required for this demo.');
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Nestable 1
|
||||
*/
|
||||
$('#nestable').nestable({
|
||||
group: 1
|
||||
}).on('change', updateOutput);
|
||||
|
||||
/*
|
||||
Output Initial Serialised Data
|
||||
*/
|
||||
$(function() {
|
||||
updateOutput($('#nestable').data('output', $('#nestable-output')));
|
||||
});
|
||||
|
||||
}).apply(this, [jQuery]);
|
||||
Reference in New Issue
Block a user