beautify_js
This commit is contained in:
parent
0febe4f5fd
commit
5c2f32e184
208 changed files with 3891 additions and 1474 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue