@@ -93,12 +93,12 @@ QUnit.test( "attr(String)", function( assert ) {
9393assert . equal ( jQuery ( "#area1" ) . attr ( "maxLength" ) , "30" , "Check for maxLength attribute" ) ;
9494
9595// using innerHTML in IE causes href attribute to be serialized to the full path
96- jQuery ( "<a/ >" ) . attr ( {
96+ jQuery ( "<a></a >" ) . attr ( {
9797"id" :"tAnchor5" ,
9898"href" :"#5"
9999} ) . appendTo ( "#qunit-fixture" ) ;
100100assert . equal ( jQuery ( "#tAnchor5" ) . attr ( "href" ) , "#5" , "Check for non-absolute href (an anchor)" ) ;
101- jQuery ( "<a id='tAnchor6' href='#5' / >" ) . appendTo ( "#qunit-fixture" ) ;
101+ jQuery ( "<a id='tAnchor6' href='#5'></a >" ) . appendTo ( "#qunit-fixture" ) ;
102102assert . equal ( jQuery ( "#tAnchor5" ) . prop ( "href" ) , jQuery ( "#tAnchor6" ) . prop ( "href" ) , "Check for absolute href prop on an anchor" ) ;
103103
104104jQuery ( "<script type='jquery/test' src='#5' id='scriptSrc'></script>" ) . appendTo ( "#qunit-fixture" ) ;
@@ -136,7 +136,7 @@ QUnit.test( "attr(String)", function( assert ) {
136136assert . equal ( $img . attr ( "height" ) , "53" , "Retrieve height attribute on an element with display:none." ) ;
137137
138138// Check for style support
139- styleElem = jQuery ( "<div/ >" ) . appendTo ( "#qunit-fixture" ) . css ( {
139+ styleElem = jQuery ( "<div></div >" ) . appendTo ( "#qunit-fixture" ) . css ( {
140140background :"url(UPPERlower.gif)"
141141} ) ;
142142assert . ok ( ! ! ~ styleElem . attr ( "style" ) . indexOf ( "UPPERlower.gif" ) , "Check style attribute getter" ) ;
@@ -158,11 +158,11 @@ QUnit.test( "attr(String)", function( assert ) {
158158$a = jQuery ( "<a href='#' onclick='something()'>Click</a>" ) . appendTo ( "#qunit-fixture" ) ;
159159assert . equal ( $a . attr ( "onclick" ) , "something()" , "Retrieve ^on attribute without anonymous function wrapper." ) ;
160160
161- assert . ok ( jQuery ( "<div/ >" ) . attr ( "doesntexist" ) === undefined , "Make sure undefined is returned when no attribute is found." ) ;
162- assert . ok ( jQuery ( "<div/ >" ) . attr ( "title" ) === undefined , "Make sure undefined is returned when no attribute is found." ) ;
163- assert . equal ( jQuery ( "<div/ >" ) . attr ( "title" , "something" ) . attr ( "title" ) , "something" , "Set the title attribute." ) ;
161+ assert . ok ( jQuery ( "<div></div >" ) . attr ( "doesntexist" ) === undefined , "Make sure undefined is returned when no attribute is found." ) ;
162+ assert . ok ( jQuery ( "<div></div >" ) . attr ( "title" ) === undefined , "Make sure undefined is returned when no attribute is found." ) ;
163+ assert . equal ( jQuery ( "<div></div >" ) . attr ( "title" , "something" ) . attr ( "title" ) , "something" , "Set the title attribute." ) ;
164164assert . ok ( jQuery ( ) . attr ( "doesntexist" ) === undefined , "Make sure undefined is returned when no element is there." ) ;
165- assert . equal ( jQuery ( "<div/ >" ) . attr ( "value" ) , undefined , "An unset value on a div returns undefined." ) ;
165+ assert . equal ( jQuery ( "<div></div >" ) . attr ( "value" ) , undefined , "An unset value on a div returns undefined." ) ;
166166assert . strictEqual ( jQuery ( "<select><option value='property'></option></select>" ) . attr ( "value" ) , undefined , "An unset value on a select returns undefined." ) ;
167167
168168$form = jQuery ( "#form" ) . attr ( "enctype" , "multipart/form-data" ) ;
@@ -180,7 +180,7 @@ QUnit.test( "attr(String) on cloned elements, #9646", function( assert ) {
180180
181181assert . strictEqual ( input . clone ( true ) . attr ( "name" , "test" ) [ 0 ] . name , "test" , "Name attribute should be changed on cloned element" ) ;
182182
183- div = jQuery ( "<div id='tester' / >" ) ;
183+ div = jQuery ( "<div id='tester'></div >" ) ;
184184div . attr ( "id" ) ;
185185
186186assert . strictEqual ( div . clone ( true ) . attr ( "id" , "test" ) [ 0 ] . id , "test" , "Id attribute should be changed on cloned element" ) ;
@@ -299,7 +299,7 @@ QUnit.test( "attr(String, Object)", function( assert ) {
299299$input = jQuery ( "<input type='checkbox'/>" ) . attr ( "checked" , true ) ;
300300assert . equal ( $input . prop ( "checked" ) , true , "Setting checked updates property (verified by .prop)" ) ;
301301assert . equal ( $input [ 0 ] . checked , true , "Setting checked updates property (verified by native property)" ) ;
302- $input = jQuery ( "<option/ >" ) . attr ( "selected" , true ) ;
302+ $input = jQuery ( "<option></option >" ) . attr ( "selected" , true ) ;
303303assert . equal ( $input . prop ( "selected" ) , true , "Setting selected updates property (verified by .prop)" ) ;
304304assert . equal ( $input [ 0 ] . selected , true , "Setting selected updates property (verified by native property)" ) ;
305305
@@ -569,7 +569,7 @@ QUnit.test( "removeAttr(String)", function( assert ) {
569569assert . expect ( 12 ) ;
570570var $first ;
571571
572- assert . equal ( jQuery ( "<div class='hello' / >" ) . removeAttr ( "class" ) . attr ( "class" ) , undefined , "remove class" ) ;
572+ assert . equal ( jQuery ( "<div class='hello'></div >" ) . removeAttr ( "class" ) . attr ( "class" ) , undefined , "remove class" ) ;
573573assert . equal ( jQuery ( "#form" ) . removeAttr ( "id" ) . attr ( "id" ) , undefined , "Remove id" ) ;
574574assert . equal ( jQuery ( "#foo" ) . attr ( "style" , "position:absolute;" ) . removeAttr ( "style" ) . attr ( "style" ) , undefined , "Check removing style attribute" ) ;
575575assert . equal ( jQuery ( "#form" ) . attr ( "style" , "position:absolute;" ) . removeAttr ( "style" ) . attr ( "style" ) , undefined , "Check removing style attribute on a form" ) ;
@@ -669,7 +669,7 @@ QUnit.test( "prop(String, Object)", function( assert ) {
669669assert . equal ( jQuery ( "#select2" ) . prop ( "selectedIndex" ) , 3 , "Check for selectedIndex attribute" ) ;
670670assert . equal ( jQuery ( "#foo" ) . prop ( "nodeName" ) . toUpperCase ( ) , "DIV" , "Check for nodeName attribute" ) ;
671671assert . equal ( jQuery ( "#foo" ) . prop ( "tagName" ) . toUpperCase ( ) , "DIV" , "Check for tagName attribute" ) ;
672- assert . equal ( jQuery ( "<option/ >" ) . prop ( "selected" ) , false , "Check selected attribute on disconnected element." ) ;
672+ assert . equal ( jQuery ( "<option></option >" ) . prop ( "selected" ) , false , "Check selected attribute on disconnected element." ) ;
673673
674674assert . equal ( jQuery ( "#listWithTabIndex" ) . prop ( "tabindex" ) , 5 , "Check retrieving tabindex" ) ;
675675jQuery ( "#text1" ) . prop ( "readonly" , true ) ;
@@ -814,16 +814,16 @@ QUnit.test( "option.prop('selected', true) affects select.selectedIndex (gh-2732
814814
815815function addOptions ( $elem ) {
816816return $elem . append (
817- jQuery ( "<option/ >" ) . val ( "a" ) . text ( "One" ) ,
818- jQuery ( "<option/ >" ) . val ( "b" ) . text ( "Two" ) ,
819- jQuery ( "<option/ >" ) . val ( "c" ) . text ( "Three" )
817+ jQuery ( "<option></option >" ) . val ( "a" ) . text ( "One" ) ,
818+ jQuery ( "<option></option >" ) . val ( "b" ) . text ( "Two" ) ,
819+ jQuery ( "<option></option >" ) . val ( "c" ) . text ( "Three" )
820820)
821821. find ( "[value=a]" ) . prop ( "selected" , true ) . end ( )
822822. find ( "[value=c]" ) . prop ( "selected" , true ) . end ( ) ;
823823}
824824
825825var $optgroup ,
826- $select = jQuery ( "<select/ >" ) ;
826+ $select = jQuery ( "<select></select >" ) ;
827827
828828// Check select with options
829829addOptions ( $select ) . appendTo ( "#qunit-fixture" ) ;
@@ -833,7 +833,7 @@ QUnit.test( "option.prop('selected', true) affects select.selectedIndex (gh-2732
833833$select . empty ( ) ;
834834
835835// Check select with optgroup
836- $optgroup = jQuery ( "<optgroup/ >" ) ;
836+ $optgroup = jQuery ( "<optgroup></optgroup >" ) ;
837837addOptions ( $optgroup ) . appendTo ( $select ) ;
838838$select . find ( "[value=b]" ) . prop ( "selected" , true ) ;
839839
@@ -947,7 +947,7 @@ QUnit.test( "val()", function( assert ) {
947947assert . equal ( $button . val ( ) , "foobar" , "Value retrieval on a button does not return innerHTML" ) ;
948948assert . equal ( $button . val ( "baz" ) . html ( ) , "text" , "Setting the value does not change innerHTML" ) ;
949949
950- assert . equal ( jQuery ( "<option/ >" ) . val ( "test" ) . attr ( "value" ) , "test" , "Setting value sets the value attribute" ) ;
950+ assert . equal ( jQuery ( "<option></option >" ) . val ( "test" ) . attr ( "value" ) , "test" , "Setting value sets the value attribute" ) ;
951951} ) ;
952952
953953QUnit . test ( "val() with non-matching values on dropdown list" , function ( assert ) {
@@ -1014,7 +1014,7 @@ var testVal = function( valueObj, assert ) {
10141014assert . equal ( document . getElementById ( "text1" ) . value , "" , "Check for modified (via val(null)) value of input element" ) ;
10151015
10161016var j ,
1017- $select = jQuery ( "<select multiple><option value='1'/ ><option value='2'/ ></select>" ) ,
1017+ $select = jQuery ( "<select multiple><option value='1'></option ><option value='2'></option ></select>" ) ,
10181018$select1 = jQuery ( "#select1" ) ;
10191019
10201020$select1 . val ( valueObj ( "3" ) ) ;
@@ -1130,7 +1130,7 @@ QUnit.test( "val(select) after form.reset() (Bug #2551)", function( assert ) {
11301130QUnit . test ( "select.val(space characters) (gh-2978)" , function ( assert ) {
11311131assert . expect ( 37 ) ;
11321132
1133- var $select = jQuery ( "<select/ >" ) . appendTo ( "#qunit-fixture" ) ,
1133+ var $select = jQuery ( "<select></select >" ) . appendTo ( "#qunit-fixture" ) ,
11341134spaces = {
11351135"\\t" :{
11361136html :"	" ,
@@ -1266,7 +1266,7 @@ var testAddClass = function( valueObj, assert ) {
12661266j . addClass ( valueObj ( "asdf" ) ) ;
12671267assert . ok ( j . hasClass ( "asdf" ) , "Check node,textnode,comment for addClass" ) ;
12681268
1269- div = jQuery ( "<div/ >" ) ;
1269+ div = jQuery ( "<div></div >" ) ;
12701270
12711271div . addClass ( valueObj ( "test" ) ) ;
12721272assert . equal ( div . attr ( "class" ) , "test" , "Make sure there's no extra whitespace." ) ;
@@ -1697,17 +1697,17 @@ QUnit.test( "coords returns correct values in IE6/IE7, see #10828", function( as
16971697assert . expect ( 1 ) ;
16981698
16991699var area ,
1700- map = jQuery ( "<map / >" ) ;
1700+ map = jQuery ( "<map></map >" ) ;
17011701
1702- area = map . html ( "<area shape='rect' coords='0,0,0,0' href='#' alt='a' / >" ) . find ( "area" ) ;
1702+ area = map . html ( "<area shape='rect' coords='0,0,0,0' href='#' alt='a'></area >" ) . find ( "area" ) ;
17031703assert . equal ( area . attr ( "coords" ) , "0,0,0,0" , "did not retrieve coords correctly" ) ;
17041704} ) ;
17051705
17061706QUnit . test ( "should not throw at $(option).val() (#14686)" , function ( assert ) {
17071707assert . expect ( 1 ) ;
17081708
17091709try {
1710- jQuery ( "<option/ >" ) . val ( ) ;
1710+ jQuery ( "<option></option >" ) . val ( ) ;
17111711assert . ok ( true ) ;
17121712} catch ( _ ) {
17131713assert . ok ( false ) ;