Commit Graph

161 Commits (master)

Author SHA1 Message Date
timmywil 96501d38a9 Allow similarly named classes (regression from 9499) and switch class retrieval to property when passing class to value functions. Fixes #9617. 2011-06-19 18:58:47 -04:00
timmywil 641ad80211 Attribute hooks do not need to be attached in XML docs. Fixes #9568. 2011-06-13 10:02:13 -04:00
timmywil db437be6e3 Check classes passed for duplicates. Fixes #9499. 2011-06-07 21:00:44 -04:00
timmywil 1d202c6afc Move the value attrHook to the main attrHooks object to save bytes 2011-05-26 16:51:41 -04:00
rwldrn f82b9dddc4 Landing pull request 382. Adds support for number values (meter,progress); Fixes #9319.
More Details:
 - https://github.com/jquery/jquery/pull/382
 - http://bugs.jquery.com/ticket/9319
2011-05-20 11:03:33 -04:00
timmywil a1545b5079 Unnecessary var removed. 2011-05-18 11:59:21 -04:00
timmywil 25118e22a2 Handle unset value attributes consistently depending on property existence. Supplements #9328. 2011-05-18 11:46:22 -04:00
timmywil ba90af0dc5 Make the value hook less obtrusive for elements which do not inherently have a value property. Fixes #9328. 2011-05-18 11:29:25 -04:00
timmywil 7d3ba9f89e Switched title attribute to getAttributeNode for IE6/7. Fixes #9329. 2011-05-18 11:05:20 -04:00
timmywil a5cf257a8a Use getAttributeNode for ^on attributes in IE6/7 to avoid anonymous function wrapper. Fixes #9298. 2011-05-16 10:17:50 -04:00
timmywil 6171e0a923 Retrieve the class attribute on a form in IE6/7. Fixes 9286. 2011-05-14 12:07:40 -04:00
timmywil cf702496ee Removing unnecessary argument type check for boolean hook 2011-05-13 13:47:44 -04:00
timmywil bc82ff0ff9 Make sure setting boolean attributes to the same name sets the property to a boolean type 2011-05-13 13:39:38 -04:00
timmywil 6f676e692d Use prop to retrieve boolean properties (so the selected hook will be used) 2011-05-13 13:33:43 -04:00
timmywil 4526c8b0a0 Add fallback to prop for the window and document. Switch value to use the property instead of the attribute for back compat. 2011-05-10 00:28:02 -04:00
timmywil 18b1cf2942 Remove value check from formHook; other elements can use value hook 2011-05-07 22:01:10 -04:00
timmywil c085563270 Reduce the boolean list only to those that have corresponding IDLs that don't require being added to propFix; only set the IDL if it exists
- See http://jsfiddle.net/timmywil/u5NLn/ for how boolean attributes are handled in every browser.
2011-05-07 14:49:04 -04:00
timmywil 09c0cf995b Global found in valHook for select(get) 2011-05-07 11:48:42 -04:00
timmywil c72b0f3256 Check empty string instead of specified as specified is inconsistent on the name attribute. Fixes #9148. 2011-05-06 13:49:20 -04:00
timmywil a257e07ae4 Reduce boolean attribute list to only content attributes
- Removed IDL-only boolean attributes as well as officially deprecated attributes that we've not supported before
2011-05-06 10:53:05 -04:00
timmywil f30cd4155e Update boolean attribute list to contain all boolean attributes listed in w3c 2011-05-05 14:37:59 -04:00
timmywil cccf9ad91d Add support for the contenteditable attribute 2011-05-05 12:52:04 -04:00
timmywil 5097e6d1c6 Construct boolHook and rboolean regex to deal with boolean attributes. Fixes #9129. Fixes #9123.
- Construct regex for all attributes which are boolean attributes by specification.

  + This allows us to do what users expect with enumerated attributes and allows us to no longer complicate the issue.

  + People are just too confused with passing "true" instead of true when they should, so we won't have to worry about that anymore.

- Modularize code for dealing with boolean attributes into a separate hook to keep attr short and fast.
2011-05-05 12:17:08 -04:00
timmywil 5195335cf4 Set the property corresponding to a boolean attribute when setting to true. Fixes #9103.
- Once boolean properties had been modified natively, setting the attribute no longer set the current value
2011-05-04 15:53:00 -04:00
timmywil 3ed4b22073 Run property names through propFix in removeProp 2011-05-04 11:40:46 -04:00
timmywil 480b88ca37 Set corresponding property to false when removing boolean attributes. Fixes #9094 2011-05-04 11:29:38 -04:00
timmywil 97144424cc Update boolean check to avoid crashes, add all name fixes to propFix (properties are case-sensitive in all browsers), add tests for prop 2011-05-04 00:31:01 -04:00
John Resig a9d9f8c542 If no hook is provided, and a boolean property exists, use that to return an attribute-style value for boolean attributes. Fixes #9079. 2011-05-03 21:44:42 -04:00
timmywil 4ac2fdda2c Fix setting value attributes on option elements. Fixes #9071. 2011-05-03 14:48:36 -04:00
timmywil 24a8ffb3ea Test for a colon in attribute names for IE6/7. Fixes #1591. 2011-05-01 17:09:50 -04:00
Rick Waldron bf678fd9d6 Restores var names to satisfy the crock-machine. Supplements #9008 2011-04-28 22:26:34 -04:00
timmywil 5165033883 Add tests data- and aria- attributes and the autofocus boolean attribute and some style updates in jQuery.attr 2011-04-25 12:41:12 -04:00
aFarkas 83e9ce95d7 handle data- and aria- special 2011-04-25 12:41:12 -04:00
aFarkas 9559b1a294 dealing with boolean content attribute 2011-04-25 12:41:12 -04:00
timmywil 15ccae91db Switch the form nodeName check in attr to use jQuery.nodeName for consistency 2011-04-23 13:56:51 -04:00
timmywil 2942be780f Combine the support tests for radioValue and appendChecked 2011-04-22 00:27:52 -04:00
timmywil 3ac9eb7ce3 Landing pull request [337](https://github.com/jquery/jquery/pull/337). Value of radio inputs resets when type is set after the value in all IEs. Fixes #8570 ([bug](http://bugs.jquery.com/ticket/8570)). 2011-04-21 21:33:09 -04:00
timmywil 103d325887 Follow w3c standard for setting the common boolean attributes to the same name(selected, checked, readOnly, and disabled) 2011-04-19 17:48:07 -04:00
timmywil 825d3d96ce Only use getAttributeNode on buttons when setting value 2011-04-19 13:17:38 -04:00
timmywil 34d80709ce Fix value attribute and val for value on button elements. Fixes #1954 2011-04-17 18:17:31 -04:00
timmywil b6d21592cb Add support for setting the cellPadding attribute in IE6/7 2011-04-14 23:11:49 -04:00
timmywil cb659c6054 retrieving list with getAttribute is fine, no need to add list here anymore 2011-04-11 19:30:20 -04:00
jeresig 92dfb53314 Merge branch 'attrhooks.1.6v2' of https://github.com/timmywil/jquery 2011-04-10 17:11:35 -04:00
timmywil 215c507f79 Added back support.js test for getSetAttribute and removed some duplicate code that crept into attributes.js 2011-04-10 17:08:18 -04:00
jeresig f89edbc6e4 Merge branch 'modest_val_proposal' of https://github.com/timmywil/jquery into timmywil-modest_val_proposal
Conflicts:
	src/attributes.js
2011-04-10 16:56:56 -04:00
jeresig b92d2f0bc9 Merge branch 'attrhooks.1.6v2' of https://github.com/timmywil/jquery into timmywil-attrhooks.1.6v2
Conflicts:
	src/attributes.js
2011-04-10 15:41:51 -04:00
timmywil 3a1b4661f5 #8150 - When removing the width and height attributes in IE6/7, setting to "" actually sets to 0 instead of auto
- Having fixed this automatically with the use of removeAttribute in browsers that support it, this will fix it for IE6/7 as well.

- This has no effect on width/height styles set elsewhere( test added to removeAttr )

- With this addition, I need to call attr in removeAttr for IE6/7, which means boolean calls like .attr("checked", "") will no longer remove the attribute, which I think is fine.  .attr("checked", false) will still remove.  If I had left it, it would have gone in an infinite loop since setting to empty string is the only way to remove it in these browsers.

- The hrefNormalized hooks were returning null if they weren't present.  Added the null check to the getter.

- Now that the style support fails in IE8 as well due to uppercasing everything, no need to have style included with the hrefNormalized hooks
2011-04-09 17:25:06 -04:00
timmywil d47c0ae422 Performance testing: localize val to each block and only set val to value when not a function 2011-04-05 22:40:12 -04:00
timmywil 94fff6ff62 Remove the unused radiocheck regex 2011-04-04 14:22:58 -04:00
timmywil 6f79bee3e3 Normalize css property names to lowercase for comparisons on a .attr('style') call since IE uppercases everything 2011-04-03 19:13:41 -04:00