1
0
Fork 0
forked from 0x2620/oxjs

minor changes, mostly documentation

This commit is contained in:
rlx 2012-03-30 01:41:47 +00:00
commit 044da383db
3 changed files with 9 additions and 9 deletions

View file

@ -71,7 +71,9 @@ Ox.element <f> Generic HTML element, mimics jQuery
> Ox.element("<div>").html("red").html()
"red"
@*/
Ox.element = function(str) {
Ox.$ = Ox.element = function(str) {
// fixme: add generic bind (remove click and mousedown),
// add native css selector
return {
//@ 0 <e> The DOM element itself
0: str[0] == '<' ? document.createElement(str.substr(1, str.length - 2)) :
@ -141,7 +143,6 @@ Ox.element = function(str) {
callback <f> Callback function
event <o> The DOM event
@*/
// fixme: why not a generic bind?
click: function(callback) {
this[0].onclick = callback;
return this;
@ -196,7 +197,6 @@ Ox.element = function(str) {
callback <f> Callback function
event <o> The DOM event
@*/
// fixme: why not a generic bind?
mousedown: function(callback) {
this[0].onmousedown = callback;
return this;