From 54266bd3b22e811dd7a85adc34704496a3832ffd Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 31 May 2012 00:47:57 +0200 Subject: [PATCH] minor fixes --- source/Ox/js/DOM.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/Ox/js/DOM.js b/source/Ox/js/DOM.js index a497e326..e9a17840 100644 --- a/source/Ox/js/DOM.js +++ b/source/Ox/js/DOM.js @@ -2,7 +2,7 @@ /*@ Ox.$ Generic HTML element, mimics jQuery - value <*> `window`, `document`, html element, tagname or selector + value tagname, selector, html element, `window`, or `document` Passing a tagname ('') creates an element, passing a selector ('tagname', '.classname' or '#id') selects an element. (value) -> Element object @@ -34,7 +34,7 @@ Ox.$ = Ox.element = function(value) { : value[0] == '.' ? document.getElementsByClassName(value.slice(1))[0] : document.getElementsByTagName(value)[0]; return element ? { - //@ 0 The DOM element itself + //@ 0 The DOM element itself 0: element, /*@ addClass Adds a class name @@ -252,6 +252,7 @@ Ox.$ = Ox.element = function(value) { }, /*@ trigger Triggers an event + (event) -> This element @*/ trigger: function(event) { var e = document.createEvent('MouseEvents'); @@ -268,7 +269,7 @@ Ox.$ = Ox.element = function(value) { val: function(value) { var ret; if (arguments.length == 0) { - return this[0].value; + ret = this[0].value; } else { this[0].value = value; ret = this;