<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Widget Test Suite</title>
- <script type="text/javascript" src="../../../jquery-1.4.4.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
+ <script src="../../../jquery-1.4.4.js"></script>
+ <script src="../../../ui/jquery.ui.core.js"></script>
+ <script src="../../../ui/jquery.ui.widget.js"></script>
- <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
- <script type="text/javascript" src="../../../external/qunit.js"></script>
- <script type="text/javascript" src="../../jquery.simulate.js"></script>
- <script type="text/javascript" src="../testsuite.js"></script>
+ <link rel="stylesheet" href="../../../external/qunit.css">
+ <script src="../../../external/qunit.js"></script>
+ <script src="../../jquery.simulate.js"></script>
+ <script src="../testsuite.js"></script>
- <script type="text/javascript" src="widget_core.js"></script>
- <script type="text/javascript" src="widget_tickets.js"></script>
-
- <script type="text/javascript" src="../swarminject.js"></script>
+ <script src="widget_core.js"></script>
+ <script src="widget_tickets.js"></script>
+
+ <script src="../swarminject.js"></script>
</head>
<body>
-/*
- * widget unit tests
- */
(function( $ ) {
module( "widget factory", {
});
shouldCreate = true;
- var elem = $( "<div></div>" )
+ var elem = $( "<div>" )
.bind( "testwidgetcreate", function() {
ok( shouldCreate, "create event triggered on instantiation" );
})
}
});
- var elem = $( "<div></div>" )[ 0 ];
+ var elem = $( "<div>" )[ 0 ];
shouldCreate = true;
var instance = new $.ui.testWidget( {}, elem );
});
}
});
- $( "<div></div>" ).testWidget({
+ $( "<div>" ).testWidget({
option1: "valuex",
option2: "valuex",
option3: "value3",
});
test( "re-init", function() {
- var div = $( "<div></div>" ),
+ var div = $( "<div>" ),
actions = [];
$.widget( "ui.testWidget", {
_create: function() {}
});
- var div = $( "<div></div>" ).testWidget({
+ var div = $( "<div>" ).testWidget({
foo: "bar",
baz: 5,
qux: [ "quux", "quuux" ]
calls.push( options );
}
});
- var div = $( "<div></div>" ).testWidget();
+ var div = $( "<div>" ).testWidget();
calls = [];
div.testWidget( "option", "foo", "bar" );
});
}
});
- var div = $( "<div></div>" ).testWidget();
+ var div = $( "<div>" ).testWidget();
calls = [];
div.testWidget( "option", "foo", "bar" );
same( val, false, "disabled set to false" );
}
});
- $( "<div></div>" ).testWidget().testWidget( "enable" );
+ $( "<div>" ).testWidget().testWidget( "enable" );
});
test( ".disable()", function() {
same( val, true, "disabled set to true" );
}
});
- $( "<div></div>" ).testWidget().testWidget( "disable" );
+ $( "<div>" ).testWidget().testWidget( "disable" );
});
test( ".widget() - base", function() {
$.widget( "ui.testWidget", {
_create: function() {}
});
- var div = $( "<div></div>" ).testWidget();
+ var div = $( "<div>" ).testWidget();
same( div[0], div.testWidget( "widget" )[0]);
});
test( ".widget() - overriden", function() {
- var wrapper = $( "<div></div>" );
+ var wrapper = $( "<div>" );
$.widget( "ui.testWidget", {
_create: function() {},
widget: function() {
return wrapper;
}
});
- same( wrapper[0], $( "<div></div>" ).testWidget().testWidget( "widget" )[0] );
+ same( wrapper[0], $( "<div>" ).testWidget().testWidget( "widget" )[0] );
});
test( "._trigger() - no event, no ui", function() {
$( "#widget" ).testWidget().detach();
});
-})( jQuery );
+}( jQuery ) );