function foo() {
for (var i = 0; i < arguments.length; i++) {
alert(arguments[i]);
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //map implementation | |
| function newmap(arr, func) { | |
| var newarr = []; | |
| for(var i = 0; i < arr.length; ++i) { | |
| newarr.push(func(arr[i])); | |
| } | |
| return newarr; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const widget = { | |
| "debug": "on", | |
| "window": { | |
| "title": "Sample Konfabulator Widget", | |
| "name": "main_window", | |
| "width": 500, | |
| "height": 500 | |
| }, | |
| "image": { | |
| "src": "Images/Sun.png", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root = [{ | |
| "id": 1, | |
| "name": "Yong", | |
| "phone": "010-2786-9902", | |
| "type": "sk", | |
| "childnode": [{ | |
| "id": 11, | |
| "name": "echo", | |
| "phone": "010-3923-1333", | |
| "type": "kt", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.addEventListener("DOMContentLoaded", function(event) { | |
| console.log("DOM fully loaded and parsed"); | |
| var nav = document.querySelector("nav"); | |
| nav.addEventListener("click", function(event) { | |
| var selectedTab = document.querySelector(".selectedTab"); | |
| if(selectedTab) selectedTab.classList.toggle("selectedTab"); | |
| console.log(event.target.nodeName); | |
| if(event.target.nodeName === "SPAN") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.addEventListener("DOMContentLoaded", function(event) { | |
| var nav = document.querySelector("nav"); | |
| nav.addEventListener("click", function(event) { | |
| var selectedTab = document.querySelector(".selectedTab"); | |
| if(selectedTab) selectedTab.classList.toggle("selectedTab"); | |
| console.log(event.target.nodeName); | |
| if(event.target.nodeName === "SPAN") { | |
| event.target.parentElement.click(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Tab = class { | |
| constructor(id, selected, url) { | |
| this.id = id; | |
| this.selected = selected; | |
| this.url = url; | |
| this.addClickListener(); | |
| } | |
| addClickListener() { | |
| var curElement = document.querySelector("#" + this.id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Tab = class { | |
| constructor(id, selected, url) { | |
| this.id = id; | |
| this.selected = selected; | |
| this.url = url; | |
| this.addClickListener(); | |
| } | |
| addClickListener() { | |
| var curElement = document.querySelector("#" + this.id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const BlogHandler = class { | |
| constructor(blogbutton, templatetext, url) { | |
| this.blogbutton = blogbutton; | |
| this.url = url; | |
| this.template = Handlebars.compile(templatetext); | |
| this.blogbutton.addEventListener("click", this.getJsonData.bind(this)); | |
| } | |
| getJsonData(template) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.addEventListener("DOMContentLoaded", function(event) { | |
| console.log("DOM fully loaded and parsed"); | |
| var dots = document.querySelectorAll(".slides_pagination a"); | |
| console.log(dots.length); | |
| var main_slides_lst = document.querySelectorAll(".main_slides_lst li"); | |
| console.log(main_slides_lst.length); |
OlderNewer