Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ryan778
GitHub Repository: Ryan778/Ryan778.github.io
Path: blob/master/emojionearea/src/function/div.js
576 views
1
define([
2
'jquery',
3
'var/slice',
4
'function/selector',
5
'function/isObject'
6
],
7
function($, slice, selector, isObject) {
8
return function(prefix) {
9
var parent = $('<div/>', isObject(prefix) ? prefix : {"class" : selector(prefix, true)});
10
$.each(slice.call(arguments).slice(1), function(i, child) {
11
if ($.isFunction(child)) {
12
child = child.call(parent);
13
}
14
if (child) {
15
$(child).appendTo(parent);
16
}
17
});
18
return parent;
19
}
20
});
21