fix type check in Ox.$
This commit is contained in:
parent
49fc8dc8ed
commit
6acfd505e6
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ Ox.$ = Ox.element = function(val) {
|
||||||
// fixme: remove click and mousedown,
|
// fixme: remove click and mousedown,
|
||||||
// add native css selector
|
// add native css selector
|
||||||
// take all matches of getElementsBy...
|
// take all matches of getElementsBy...
|
||||||
var element = Ox.isObject(val) ? val // window or document
|
var element = !Ox.isString(val) ? val // window or document
|
||||||
: val[0] == '<' ? document.createElement(Ox.sub(val, 1, -1))
|
: val[0] == '<' ? document.createElement(Ox.sub(val, 1, -1))
|
||||||
: val[0] == '#' ? document.getElementById(Ox.sub(val, 1))
|
: val[0] == '#' ? document.getElementById(Ox.sub(val, 1))
|
||||||
: val[0] == '.' ? document.getElementsByClassName(Ox.sub(val, 1))[0]
|
: val[0] == '.' ? document.getElementsByClassName(Ox.sub(val, 1))[0]
|
||||||
|
|
Loading…
Reference in a new issue