<div class="foo">
<p>
You've seen it coming!
- <br/>
+ <br>
Buy now and get nothing for free!
- <br/>
+ <br>
Well, at least no free beer. Perhaps a bear, if you can afford it.
</p>
</div>
<div class="foo">
<p>
your bear, you have to admit it!
- <br/>
+ <br>
No, we aren't selling bears.
</p>
<p>
<div class="foo">
<p>
You've seen it coming!
- <br/>
+ <br>
Buy now and get nothing for free!
- <br/>
+ <br>
Well, at least no free beer. Perhaps a bear, if you can afford it.
</p>
</div>
<div class="foo">
<p>
your bear, you have to admit it!
- <br/>
+ <br>
No, we aren't selling bears.
</p>
<p>
<div id="qunit-fixture">
<div id="ac-wrap1" class="ac-wrap"></div>
-<div id="ac-wrap2" class="ac-wrap"><input id="autocomplete" class="foo" /></div>
+<div id="ac-wrap2" class="ac-wrap"><input id="autocomplete" class="foo"></div>
<div id="autocomplete-contenteditable" contenteditable="" tabindex=0></div>
</div>
});
test( "#7092 - button creation that requires a matching label does not find label in all cases", function() {
- var group = $( "<span><label for='t7092a'/><input type='checkbox' id='t7092a'/></span>" );
+ var group = $( "<span><label for='t7092a'></label><input type='checkbox' id='t7092a'></span>" );
group.find( "input:checkbox" ).button();
ok( group.find( "label" ).is( ".ui-button" ) );
- group = $( "<input type='checkbox' id='t7092b'/><label for='t7092b'/>" );
+ group = $( "<input type='checkbox' id='t7092b'><label for='t7092b'></label>" );
group.filter( "input:checkbox" ).button();
ok( group.filter( "label" ).is( ".ui-button" ) );
- group = $( "<span><input type='checkbox' id='t7092c'/></span><label for='t7092c'/>" );
+ group = $( "<span><input type='checkbox' id='t7092c'></span><label for='t7092c'></label>" );
group.find( "input:checkbox" ).button();
ok( group.filter( "label" ).is( ".ui-button" ) );
- group = $( "<span><input type='checkbox' id='t7092d'/></span><span><label for='t7092d'/></span>" );
+ group = $( "<span><input type='checkbox' id='t7092d'></span><span><label for='t7092d'></label></span>" );
group.find( "input:checkbox" ).button();
ok( group.find( "label" ).is( ".ui-button" ) );
- group = $( "<input type='checkbox' id='t7092e'/><span><label for='t7092e'/></span>" );
+ group = $( "<input type='checkbox' id='t7092e'><span><label for='t7092e'></label></span>" );
group.filter( "input:checkbox" ).button();
ok( group.find( "label" ).is( ".ui-button" ) );
});
</map>
<div>
- <input id="visibleAncestor-inputTypeNone" />
- <input type="text" id="visibleAncestor-inputTypeText" />
- <input type="checkbox" id="visibleAncestor-inputTypeCheckbox" />
- <input type="radio" id="visibleAncestor-inputTypeRadio" />
- <input type="button" id="visibleAncestor-inputTypeButton" />
- <input type="hidden" id="visibleAncestor-inputTypeHidden" />
+ <input id="visibleAncestor-inputTypeNone">
+ <input type="text" id="visibleAncestor-inputTypeText">
+ <input type="checkbox" id="visibleAncestor-inputTypeCheckbox">
+ <input type="radio" id="visibleAncestor-inputTypeRadio">
+ <input type="button" id="visibleAncestor-inputTypeButton">
+ <input type="hidden" id="visibleAncestor-inputTypeHidden">
<button id="visibleAncestor-button">x</button>
<select id="visibleAncestor-select">
<option>option</option>
</div>
<div>
- <input id="disabledElement-inputTypeNone" disabled="disabled" />
- <input type="text" id="disabledElement-inputTypeText" disabled="disabled" />
- <input type="checkbox" id="disabledElement-inputTypeCheckbox" disabled="disabled" />
- <input type="radio" id="disabledElement-inputTypeRadio" disabled="disabled" />
- <input type="button" id="disabledElement-inputTypeButton" disabled="disabled" />
- <input type="hidden" id="disabledElement-inputTypeHidden" disabled="disabled" />
+ <input id="disabledElement-inputTypeNone" disabled="disabled">
+ <input type="text" id="disabledElement-inputTypeText" disabled="disabled">
+ <input type="checkbox" id="disabledElement-inputTypeCheckbox" disabled="disabled">
+ <input type="radio" id="disabledElement-inputTypeRadio" disabled="disabled">
+ <input type="button" id="disabledElement-inputTypeButton" disabled="disabled">
+ <input type="hidden" id="disabledElement-inputTypeHidden" disabled="disabled">
<button id="disabledElement-button" disabled="disabled"></button>
<select id="disabledElement-select" disabled="disabled"></select>
<textarea id="disabledElement-textarea" disabled="disabled"></textarea>
<div>
<div id="displayNoneAncestor" style="display: none;">
- <input id="displayNoneAncestor-input" />
+ <input id="displayNoneAncestor-input">
<span tabindex="1" id="displayNoneAncestor-span">.</span>
</div>
<div id="visibilityHiddenAncestor" style="visibility: hidden;">
- <input id="visibilityHiddenAncestor-input" />
+ <input id="visibilityHiddenAncestor-input">
<span tabindex="1" id="visibilityHiddenAncestor-span">.</span>
</div>
<span tabindex="1" id="displayNone-span" style="display: none;">.</span>
<span tabindex="1" id="visibilityHidden-span" style="visibility: hidden;">.</span>
- <input id="displayNone-input" style="display: none;" />
- <input id="visibilityHidden-input" style="visibility: hidden;" />
+ <input id="displayNone-input" style="display: none;">
+ <input id="visibilityHidden-input" style="visibility: hidden;">
</div>
<div>
- <input id="inputTabindex0" tabindex="0" />
- <input id="inputTabindex10" tabindex="10" />
- <input id="inputTabindex-1" tabindex="-1" />
- <input id="inputTabindex-50" tabindex="-50" />
+ <input id="inputTabindex0" tabindex="0">
+ <input id="inputTabindex10" tabindex="10">
+ <input id="inputTabindex-1" tabindex="-1">
+ <input id="inputTabindex-50" tabindex="-50">
<span id="spanTabindex0" tabindex="0">.</span>
<span id="spanTabindex10" tabindex="10">.</span>
ok(!el.is(':data(test)'), msg);
}
- el = $('<div/>');
+ el = $('<div>');
shouldNotHaveData('data never set');
- el = $('<div/>').data('test', null);
+ el = $('<div>').data('test', null);
shouldNotHaveData('data is null');
- el = $('<div/>').data('test', true);
+ el = $('<div>').data('test', true);
shouldHaveData('data set to true');
- el = $('<div/>').data('test', false);
+ el = $('<div>').data('test', false);
shouldNotHaveData('data set to false');
- el = $('<div/>').data('test', 0);
+ el = $('<div>').data('test', 0);
shouldNotHaveData('data set to 0');
- el = $('<div/>').data('test', 1);
+ el = $('<div>').data('test', 1);
shouldHaveData('data set to 1');
- el = $('<div/>').data('test', '');
+ el = $('<div>').data('test', '');
shouldNotHaveData('data set to empty string');
- el = $('<div/>').data('test', 'foo');
+ el = $('<div>').data('test', 'foo');
shouldHaveData('data set to string');
- el = $('<div/>').data('test', []);
+ el = $('<div>').data('test', []);
shouldHaveData('data set to empty array');
- el = $('<div/>').data('test', [1]);
+ el = $('<div>').data('test', [1]);
shouldHaveData('data set to array');
- el = $('<div/>').data('test', {});
+ el = $('<div>').data('test', {});
shouldHaveData('data set to empty object');
- el = $('<div/>').data('test', {foo: 'bar'});
+ el = $('<div>').data('test', {foo: 'bar'});
shouldHaveData('data set to object');
- el = $('<div/>').data('test', new Date());
+ el = $('<div>').data('test', new Date());
shouldHaveData('data set to date');
- el = $('<div/>').data('test', /test/);
+ el = $('<div>').data('test', /test/);
shouldHaveData('data set to regexp');
- el = $('<div/>').data('test', function() {});
+ el = $('<div>').data('test', function() {});
shouldHaveData('data set to function');
});
equals(titleId, 'ui-dialog-title-2', 'auto-numbered title id');
el.remove();
- el = $('<div id="foo"/>').dialog();
+ el = $('<div id="foo">').dialog();
titleId = dlg().find('.ui-dialog-title').attr('id');
equals(titleId, 'ui-dialog-title-foo', 'carried over title id');
el.remove();
});
test("widget method", function() {
- var dialog = $("<div/>").appendTo("#main").dialog();
+ var dialog = $("<div>").appendTo("#main").dialog();
same(dialog.parent()[0], dialog.dialog("widget")[0]);
});
equals(el.dialog("option", "title"), "", "option not changed");
el.remove();
- el = $('<div title="foo"/>').dialog();
+ el = $('<div title="foo">').dialog();
equals(titleText(), "foo", "title in element attribute");
equals(el.dialog("option", "title"), "foo", "option updated from attribute");
el.remove();
equals(el.dialog("option", "title"), "foo", "opiton set from options hash");
el.remove();
- el = $('<div title="foo"/>').dialog({ title: 'bar' });
+ el = $('<div title="foo">').dialog({ title: 'bar' });
equals(titleText(), "bar", "title in init options should override title in element attribute");
equals(el.dialog("option", "title"), "bar", "opiton set from options hash");
el.remove();
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8">
<title>jQuery UI Unit Tests</title>
- <link type="text/css" href="../../themes/base/jquery.ui.base.css" rel="stylesheet" />
- <link rel="stylesheet" href="../../external/qunit.css" type="text/css"/>
- <style type="text/css">
- ul { font-family: 'trebuchet ms', verdana, arial; }
- h2, ul {font-size: 10pt; }
- h2 {
- background-color:#EEEEEE;
- color:black;
- font-size:small;
- font-weight:normal;
- margin:0;
- padding:10px;
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.core.css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.theme.css">
+ <style>
+ body {
+ font-size: 62.5%;
+ }
+ .ui-widget-header {
+ padding: 0.2em 0.5em;
+ margin: 0;
+ }
+ .ui-widget-content {
+ padding: 1em;
+ margin-bottom: 1em;
+ }
+ ul {
+ margin: 0;
+ list-style: none;
+ }
+ li {
+ line-height: 2em;
}
</style>
+ <script src="../jquery.js"></script>
+ <script>
+ $(function() {
+ $( "#main" )
+ .addClass( "ui-widget" )
+ .find( "h1, h2" )
+ .addClass( "ui-widget-header ui-corner-top" )
+ .next()
+ .addClass( "ui-widget-content ui-corner-bottom" );
+
+ });
+ </script>
</head>
<body>
-<h1 id="qunit-header">jQuery UI Unit Tests</h1>
+<div id="main">
+ <h1>jQuery UI Unit Tests</h1>
+ <div>
+ <h2>Full Test Suite</h2>
+ <ul>
+ <li><a href="all.html">All</a></li>
+ </ul>
-<h2>Core</h2>
-<ul>
- <li><a href="core/core.html">Core</a></li>
- <li><a href="widget/widget.html">Widget</a></li>
-</ul>
+ <h2>Core</h2>
+ <ul>
+ <li><a href="core/core.html">Core</a></li>
+ <li><a href="widget/widget.html">Widget</a></li>
+ </ul>
-<h2>Interactions</h2>
-<ul>
- <li><a href="draggable/draggable.html">Draggable</a></li>
- <li><a href="droppable/droppable.html">Droppable</a></li>
- <li><a href="resizable/resizable.html">Resizable</a></li>
- <li><a href="selectable/selectable.html">Selectable</a></li>
- <li><a href="sortable/sortable.html">Sortable</a></li>
-</ul>
+ <h2>Interactions</h2>
+ <ul>
+ <li><a href="draggable/draggable.html">Draggable</a></li>
+ <li><a href="droppable/droppable.html">Droppable</a></li>
+ <li><a href="resizable/resizable.html">Resizable</a></li>
+ <li><a href="selectable/selectable.html">Selectable</a></li>
+ <li><a href="sortable/sortable.html">Sortable</a></li>
+ </ul>
-<h2>Widgets</h2>
-<ul>
- <li><a href="accordion/accordion.html">Accordion</a></li>
- <li><a href="autocomplete/autocomplete.html">Autocomplete</a></li>
- <li><a href="button/button.html">Button</a></li>
- <li><a href="datepicker/datepicker.html">Datepicker</a></li>
- <li><a href="dialog/dialog.html">Dialog</a></li>
- <li><a href="menu/menu.html">Menu</a></li>
- <li><a href="progressbar/progressbar.html">Progressbar</a></li>
- <li><a href="slider/slider.html">Slider</a></li>
- <li><a href="spinner/spinner.html">Spinner</a></li>
- <li><a href="tabs/tabs.html">Tabs</a></li>
- <li><a href="tooltip/tooltip.html">Tooltip</a></li>
-</ul>
+ <h2>Widgets</h2>
+ <ul>
+ <li><a href="accordion/accordion.html">Accordion</a></li>
+ <li><a href="autocomplete/autocomplete.html">Autocomplete</a></li>
+ <li><a href="button/button.html">Button</a></li>
+ <li><a href="datepicker/datepicker.html">Datepicker</a></li>
+ <li><a href="dialog/dialog.html">Dialog</a></li>
+ <li><a href="menu/menu.html">Menu</a></li>
+ <li><a href="progressbar/progressbar.html">Progressbar</a></li>
+ <li><a href="slider/slider.html">Slider</a></li>
+ <li><a href="spinner/spinner.html">Spinner</a></li>
+ <li><a href="tabs/tabs.html">Tabs</a></li>
+ <li><a href="tooltip/tooltip.html">Tooltip</a></li>
+ </ul>
-<h2>Utilities</h2>
-<ul>
- <li><a href="position/position.html">Position</a></li>
-</ul>
+ <h2>Utilities</h2>
+ <ul>
+ <li><a href="position/position.html">Position</a></li>
+ </ul>
-<h2>Effects</h2>
-<ul>
- <li><a href="effects/effects.html">Effects</a></li>
-</ul>
+ <h2>Effects</h2>
+ <ul>
+ <li><a href="effects/effects.html">Effects</a></li>
+ </ul>
+ </div>
+</div>
</body>
-
</html>
});
$menu.find( "li a:first" ).trigger( "click" );
- $( "<a/>", { id: "remove"} ).appendTo("body").trigger( "click" );
+ $( "<a>", { id: "remove"} ).appendTo("body").trigger( "click" );
$("#remove").remove();
});