update Ox.$ tests

This commit is contained in:
rolux 2012-04-15 21:12:48 +02:00
parent 0a999bc4f3
commit 0148701372

View file

@ -58,20 +58,24 @@ Ox.documentReady = (function() {
Ox.$ <f> Generic HTML element, mimics jQuery Ox.$ <f> Generic HTML element, mimics jQuery
(str) -> <o> Element object (str) -> <o> Element object
str <s> Tagname ('<tagname>') or selector ('tagname', '.classname', '#id') str <s> Tagname ('<tagname>') or selector ('tagname', '.classname', '#id')
> Ox.element("<div>").addClass("red").hasClass("red") > Ox.$('<div>').addClass('red').hasClass('red')
true true
> Ox.element("<div>").addClass("red").removeClass("red").hasClass("red") > Ox.$('<div>').addClass('red').removeClass('red').hasClass('red')
false false
> Ox.element("<div>").addClass("red").addClass("red")[0].className > Ox.$('<div>').addClass('red').addClass('red')[0].className
"red" 'red'
> Ox.element("<div>").attr({id: "red"}).attr("id") > Ox.$('<div>').attr({id: 'red'}).attr('id')
"red" 'red'
> Ox.element("<div>").css("color", "red").css("color") > Ox.$('<div>').attr({id: 'red'}).removeAttr('id').attr('id')
"red" ''
> Ox.element("<div>").html("red").html() > Ox.$('<div>').css({color: 'red'}).css('color')
"red" 'red'
> Ox.element("<div>").html("red").empty().html() > Ox.$('<div>').html('red').html()
"" 'red'
> Ox.$('<div>').html('red').empty().html()
''
> Ox.$('<input>').val('red').val()
'red'
@*/ @*/
Ox.$ = Ox.element = function(val) { Ox.$ = Ox.element = function(val) {
// fixme: remove click and mousedown, // fixme: remove click and mousedown,