14 lines
294 B
JavaScript
14 lines
294 B
JavaScript
'use strict';
|
|
|
|
var $ = function(sel, el) {
|
|
return (el || window.document).querySelector(sel);
|
|
};
|
|
$.create = function(html) {
|
|
var div = document.createElement('div');
|
|
div.innerHTML = html;
|
|
return div;
|
|
};
|
|
var $$ = function(sel, el) {
|
|
return (el || window.document).querySelectorAll(sel);
|
|
};
|