summaryrefslogtreecommitdiff
path: root/www/js/menu.js
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-08-22 11:31:54 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-08-22 11:31:54 -0400
commit6f96b4f9b19e54fba9e392347959e0e1ee68d876 (patch)
tree9d98b4fce255086fdf6caada260170802ec43809 /www/js/menu.js
parente526f3df818ea21760c5eeb4e2f728845bb93140 (diff)
downloadhtml5ks-6f96b4f9b19e54fba9e392347959e0e1ee68d876.tar.xz
html5ks-6f96b4f9b19e54fba9e392347959e0e1ee68d876.zip
jshint
Diffstat (limited to 'www/js/menu.js')
-rw-r--r--www/js/menu.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/www/js/menu.js b/www/js/menu.js
index e4a8b2c..6f2fbf3 100644
--- a/www/js/menu.js
+++ b/www/js/menu.js
@@ -76,11 +76,13 @@
var optionsButton = document.getElementsByClassName("options-button");
+ var showOptions = function (e) {
+ html5ks.menu.dialog("options");
+ e.stopPropagation();
+ };
+
for (var i = optionsButton.length - 1; i >= 0; i--) {
- optionsButton[i].addEventListener("click", function (e) {
- html5ks.menu.dialog("options");
- e.stopPropagation();
- }, false);
+ optionsButton[i].addEventListener("click", showOptions, false);
}
this.elements.dialog.return.addEventListener("click", function (e) {