beautify_js

This commit is contained in:
Ilya Kantor 2015-03-09 18:48:58 +03:00
parent 0febe4f5fd
commit 5c2f32e184
208 changed files with 3891 additions and 1474 deletions

View file

@ -7,7 +7,9 @@ function Menu(options) {
}
function render() {
var html = options.template({title: options.title});
var html = options.template({
title: options.title
});
elem = document.createElement('div');
elem.innerHTML = html;
@ -32,8 +34,10 @@ function Menu(options) {
function renderItems() {
if (elem.querySelector('ul')) return;
var listHtml = options.listTemplate({items: options.items});
var listHtml = options.listTemplate({
items: options.items
});
elem.insertAdjacentHTML("beforeEnd", listHtml);
}
@ -59,4 +63,4 @@ function Menu(options) {
this.toggle = toggle;
this.close = close;
this.open = open;
}
}