add tests

This commit is contained in:
rolux 2014-09-22 14:16:00 +02:00
parent 5e4ac3492b
commit c041263c79

View file

@ -12,6 +12,10 @@ Ox.$ <f> Generic HTML element, mimics jQuery
false false
> Ox.$('<div>').addClass('red').addClass('red')[0].className > Ox.$('<div>').addClass('red').addClass('red')[0].className
'red' 'red'
> Ox.$('<a>').append(Ox.$('<b>')).children('b').length
1
> Ox.$('<b>').appendTo(Ox.$('<a>')).parents('a').length
1
> Ox.$('<div>').attr({id: 'red'}).attr('id') > Ox.$('<div>').attr({id: 'red'}).attr('id')
'red' 'red'
> Ox.$('<div>').attr({id: 'red'}).removeAttr('id').attr('id') > Ox.$('<div>').attr({id: 'red'}).removeAttr('id').attr('id')
@ -22,10 +26,10 @@ Ox.$ <f> Generic HTML element, mimics jQuery
'red' 'red'
> Ox.$('<div>').html('red').empty().html() > Ox.$('<div>').html('red').empty().html()
'' ''
> Ox.$('<input>').val('red').val()
'red'
> !!Ox.$('<div>').on({click: function(e) { Ox.test(e.type, 'click'); }}).trigger('click') > !!Ox.$('<div>').on({click: function(e) { Ox.test(e.type, 'click'); }}).trigger('click')
true true
> Ox.$('<input>').val('red').val()
'red'
@*/ @*/
Ox.$ = Ox.element = function $(value) { Ox.$ = Ox.element = function $(value) {