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
(str) -> <o> Element object
str <s> Tagname ('<tagname>') or selector ('tagname', '.classname', '#id')
> Ox.element("<div>").addClass("red").hasClass("red")
> Ox.$('<div>').addClass('red').hasClass('red')
true
> Ox.element("<div>").addClass("red").removeClass("red").hasClass("red")
> Ox.$('<div>').addClass('red').removeClass('red').hasClass('red')
false
> Ox.element("<div>").addClass("red").addClass("red")[0].className
"red"
> Ox.element("<div>").attr({id: "red"}).attr("id")
"red"
> Ox.element("<div>").css("color", "red").css("color")
"red"
> Ox.element("<div>").html("red").html()
"red"
> Ox.element("<div>").html("red").empty().html()
""
> Ox.$('<div>').addClass('red').addClass('red')[0].className
'red'
> Ox.$('<div>').attr({id: 'red'}).attr('id')
'red'
> Ox.$('<div>').attr({id: 'red'}).removeAttr('id').attr('id')
''
> Ox.$('<div>').css({color: 'red'}).css('color')
'red'
> Ox.$('<div>').html('red').html()
'red'
> Ox.$('<div>').html('red').empty().html()
''
> Ox.$('<input>').val('red').val()
'red'
@*/
Ox.$ = Ox.element = function(val) {
// fixme: remove click and mousedown,