jquery-rails 3.0.2 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0f525176b1fb71e206350f62eb13ccf958be7517
4
+ data.tar.gz: f9269ef8e99b944f0a240ae771ce3cef144044c3
5
+ SHA512:
6
+ metadata.gz: fa02650546ddb7c66d62b7618ea23bc55dff2197227e7d38e6560ea1ca39efc0ac48a2d163a3abada9da5d16cb2d9dab3183251a35d4b244b1146e3c9f420e20
7
+ data.tar.gz: b7301683327a915ada9780a34c7cbbd6a24a46d5cc9a8e6ba82c766286755785dcb1b9adce58c1ae87a1c3738aa95f6ff92e9d61d5042a3335a8fadbb0c9a401
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.0.3 (10 July 2013)
2
+
3
+ - Updated to jQuery 1.10.2
4
+
1
5
  ## 3.0.2 (04 July 2013)
2
6
 
3
7
  - Updated to latest jquery-ujs
data/README.md CHANGED
@@ -4,7 +4,7 @@ jQuery! For Rails! So great.
4
4
 
5
5
  This gem provides:
6
6
 
7
- * jQuery 1.10.1
7
+ * jQuery 1.10.2
8
8
  * the jQuery UJS adapter
9
9
  * assert_select_jquery to test jQuery responses in Ruby tests
10
10
 
@@ -19,7 +19,7 @@ minor version bump = minor-level updates to jquery
19
19
  major version bump = major-level updates to jquery and updates to rails which may be backwards-incompatible
20
20
  ```
21
21
 
22
- See VERSIONS.md to see which versions of jquery-rails bundle which
22
+ See [VERSIONS.md](VERSIONS.md) to see which versions of jquery-rails bundle which
23
23
  versions of jQuery.
24
24
 
25
25
  ## Installation
data/VERSIONS.md CHANGED
@@ -1,39 +1,41 @@
1
1
  # Bundled Versions
2
2
 
3
- | Gem | jQuery | jQuery UI |
4
- |-----|--------|-----------|
5
- | 3.0.1 | 1.10.1 | - |
6
- | 3.0.0 | ↾ | - |
7
- | 2.3.0 | 1.10.0 | 1.10.3 |
8
- | 2.2.2 | ↾ | |
9
- | 2.2.1 | 1.9.1 | |
10
- | 2.2.0 | 1.9.0 | ↾ |
11
- | 2.1.4 | 1.8.3 | 1.9.2 |
12
- | 2.1.3 | 1.8.2 | ↾ |
13
- | 2.1.2 | 1.8.1 | |
14
- | 2.1.1 | | ↾ |
15
- | 2.1.0 | 1.8.0 | 1.8.23 |
16
- | 2.0.3 | ↾ | ↾ |
17
- | 2.0.2 | 1.7.2 | 1.8.18 |
18
- | 2.0.1 | ↾ | ↾ |
19
- | 2.0.0 | | |
20
- | 1.0.19 | 1.7.1 | ↾ |
21
- | 1.0.18 | ↾ | ↾ |
22
- | 1.0.17 | 1.7.0 | ↾ |
23
- | 1.0.16 | 1.6.4 | 1.8.16 |
24
- | 1.0.15 | | ↾ |
25
- | 1.0.14 | | |
26
- | 1.0.13 | 1.6.2 | 1.8.14 |
27
- | 1.0.12 | ↾ | ↾ |
28
- | 1.0.11 | | |
29
- | 1.0.10 | ↾ | ↾ |
30
- | 1.0.9 | ↾ | ↾ |
31
- | 1.0.8 | ↾ | ↾ |
32
- | 1.0.7 | ↾ | ↾ |
33
- | 1.0.6 | ↾ | ↾ |
34
- | 1.0.5 | ↾ | ↾ |
35
- | 1.0.4 | ↾ | ↾ |
36
- | 1.0.3 | 1.6.1 | ↾ |
37
- | 1.0.2 | ↾ | ↾ |
38
- | 1.0.1 | ↾ | 1.8.12 |
39
- | 1.0.0 | 1.6.0 | - |
3
+ | Gem | jQuery | jQuery UI |
4
+ |--------|--------|-----------|
5
+ | 3.0.3 | 1.10.2 | - |
6
+ | 3.0.2 | ↾ | - |
7
+ | 3.0.1 | 1.10.1 | - |
8
+ | 3.0.0 | ↾ | - |
9
+ | 2.3.0 | 1.10.0 | 1.10.3 |
10
+ | 2.2.2 | | ↾ |
11
+ | 2.2.1 | 1.9.1 | |
12
+ | 2.2.0 | 1.9.0 | ↾ |
13
+ | 2.1.4 | 1.8.3 | 1.9.2 |
14
+ | 2.1.3 | 1.8.2 | ↾ |
15
+ | 2.1.2 | 1.8.1 | |
16
+ | 2.1.1 | ↾ | ↾ |
17
+ | 2.1.0 | 1.8.0 | 1.8.23 |
18
+ | 2.0.3 | ↾ | ↾ |
19
+ | 2.0.2 | 1.7.2 | 1.8.18 |
20
+ | 2.0.1 | | ↾ |
21
+ | 2.0.0 | ↾ | ↾ |
22
+ | 1.0.19 | 1.7.1 | ↾ |
23
+ | 1.0.18 | | |
24
+ | 1.0.17 | 1.7.0 | ↾ |
25
+ | 1.0.16 | 1.6.4 | 1.8.16 |
26
+ | 1.0.15 | | |
27
+ | 1.0.14 | ↾ | ↾ |
28
+ | 1.0.13 | 1.6.2 | 1.8.14 |
29
+ | 1.0.12 | ↾ | ↾ |
30
+ | 1.0.11 | ↾ | ↾ |
31
+ | 1.0.10 | ↾ | ↾ |
32
+ | 1.0.9 | ↾ | ↾ |
33
+ | 1.0.8 | ↾ | ↾ |
34
+ | 1.0.7 | ↾ | ↾ |
35
+ | 1.0.6 | ↾ | ↾ |
36
+ | 1.0.5 | | ↾ |
37
+ | 1.0.4 | ↾ | ↾ |
38
+ | 1.0.3 | 1.6.1 | |
39
+ | 1.0.2 | | |
40
+ | 1.0.1 | ↾ | 1.8.12 |
41
+ | 1.0.0 | 1.6.0 | - |
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Rails
3
- VERSION = "3.0.2"
4
- JQUERY_VERSION = "1.10.1"
3
+ VERSION = "3.0.3"
4
+ JQUERY_VERSION = "1.10.2"
5
5
  JQUERY_UJS_VERSION = "e9e8b8fd3abb1571781bca7640e5c0c4d9cea2e3"
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * jQuery JavaScript Library v1.10.1
2
+ * jQuery JavaScript Library v1.10.2
3
3
  * http://jquery.com/
4
4
  *
5
5
  * Includes Sizzle.js
@@ -9,7 +9,7 @@
9
9
  * Released under the MIT license
10
10
  * http://jquery.org/license
11
11
  *
12
- * Date: 2013-05-30T21:49Z
12
+ * Date: 2013-07-03T13:48Z
13
13
  */
14
14
  (function( window, undefined ) {
15
15
 
@@ -46,7 +46,7 @@ var
46
46
  // List of deleted data cache ids, so we can reuse them
47
47
  core_deletedIds = [],
48
48
 
49
- core_version = "1.10.1",
49
+ core_version = "1.10.2",
50
50
 
51
51
  // Save a reference to some core methods
52
52
  core_concat = core_deletedIds.concat,
@@ -1000,14 +1000,14 @@ function isArraylike( obj ) {
1000
1000
  // All jQuery objects should point back to these
1001
1001
  rootjQuery = jQuery(document);
1002
1002
  /*!
1003
- * Sizzle CSS Selector Engine v1.9.4-pre
1003
+ * Sizzle CSS Selector Engine v1.10.2
1004
1004
  * http://sizzlejs.com/
1005
1005
  *
1006
1006
  * Copyright 2013 jQuery Foundation, Inc. and other contributors
1007
1007
  * Released under the MIT license
1008
1008
  * http://jquery.org/license
1009
1009
  *
1010
- * Date: 2013-05-27
1010
+ * Date: 2013-07-03
1011
1011
  */
1012
1012
  (function( window, undefined ) {
1013
1013
 
@@ -1040,7 +1040,13 @@ var i,
1040
1040
  tokenCache = createCache(),
1041
1041
  compilerCache = createCache(),
1042
1042
  hasDuplicate = false,
1043
- sortOrder = function() { return 0; },
1043
+ sortOrder = function( a, b ) {
1044
+ if ( a === b ) {
1045
+ hasDuplicate = true;
1046
+ return 0;
1047
+ }
1048
+ return 0;
1049
+ },
1044
1050
 
1045
1051
  // General-purpose constants
1046
1052
  strundefined = typeof undefined,
@@ -1283,14 +1289,6 @@ function Sizzle( selector, context, results, seed ) {
1283
1289
  return select( selector.replace( rtrim, "$1" ), context, results, seed );
1284
1290
  }
1285
1291
 
1286
- /**
1287
- * For feature detection
1288
- * @param {Function} fn The function to test for native support
1289
- */
1290
- function isNative( fn ) {
1291
- return rnative.test( fn + "" );
1292
- }
1293
-
1294
1292
  /**
1295
1293
  * Create key-value caches of limited size
1296
1294
  * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
@@ -1344,58 +1342,14 @@ function assert( fn ) {
1344
1342
  /**
1345
1343
  * Adds the same handler for all of the specified attrs
1346
1344
  * @param {String} attrs Pipe-separated list of attributes
1347
- * @param {Function} handler The method that will be applied if the test fails
1348
- * @param {Boolean} test The result of a test. If true, null will be set as the handler in leiu of the specified handler
1345
+ * @param {Function} handler The method that will be applied
1349
1346
  */
1350
- function addHandle( attrs, handler, test ) {
1351
- attrs = attrs.split("|");
1352
- var current,
1353
- i = attrs.length,
1354
- setHandle = test ? null : handler;
1347
+ function addHandle( attrs, handler ) {
1348
+ var arr = attrs.split("|"),
1349
+ i = attrs.length;
1355
1350
 
1356
1351
  while ( i-- ) {
1357
- // Don't override a user's handler
1358
- if ( !(current = Expr.attrHandle[ attrs[i] ]) || current === handler ) {
1359
- Expr.attrHandle[ attrs[i] ] = setHandle;
1360
- }
1361
- }
1362
- }
1363
-
1364
- /**
1365
- * Fetches boolean attributes by node
1366
- * @param {Element} elem
1367
- * @param {String} name
1368
- */
1369
- function boolHandler( elem, name ) {
1370
- // XML does not need to be checked as this will not be assigned for XML documents
1371
- var val = elem.getAttributeNode( name );
1372
- return val && val.specified ?
1373
- val.value :
1374
- elem[ name ] === true ? name.toLowerCase() : null;
1375
- }
1376
-
1377
- /**
1378
- * Fetches attributes without interpolation
1379
- * http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
1380
- * @param {Element} elem
1381
- * @param {String} name
1382
- */
1383
- function interpolationHandler( elem, name ) {
1384
- // XML does not need to be checked as this will not be assigned for XML documents
1385
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
1386
- }
1387
-
1388
- /**
1389
- * Uses defaultValue to retrieve value in IE6/7
1390
- * @param {Element} elem
1391
- * @param {String} name
1392
- */
1393
- function valueHandler( elem ) {
1394
- // Ignore the value *property* on inputs by using defaultValue
1395
- // Fallback to Sizzle.attr by returning undefined where appropriate
1396
- // XML does not need to be checked as this will not be assigned for XML documents
1397
- if ( elem.nodeName.toLowerCase() === "input" ) {
1398
- return elem.defaultValue;
1352
+ Expr.attrHandle[ arr[i] ] = handler;
1399
1353
  }
1400
1354
  }
1401
1355
 
@@ -1403,7 +1357,7 @@ function valueHandler( elem ) {
1403
1357
  * Checks document order of two siblings
1404
1358
  * @param {Element} a
1405
1359
  * @param {Element} b
1406
- * @returns Returns -1 if a precedes b, 1 if a follows b
1360
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
1407
1361
  */
1408
1362
  function siblingCheck( a, b ) {
1409
1363
  var cur = b && a,
@@ -1493,7 +1447,7 @@ support = Sizzle.support = {};
1493
1447
  */
1494
1448
  setDocument = Sizzle.setDocument = function( node ) {
1495
1449
  var doc = node ? node.ownerDocument || node : preferredDoc,
1496
- parent = doc.parentWindow;
1450
+ parent = doc.defaultView;
1497
1451
 
1498
1452
  // If no document and documentElement is available, return
1499
1453
  if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
@@ -1510,7 +1464,8 @@ setDocument = Sizzle.setDocument = function( node ) {
1510
1464
  // Support: IE>8
1511
1465
  // If iframe document is assigned to "document" variable and if iframe has been reloaded,
1512
1466
  // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
1513
- if ( parent && parent.frameElement ) {
1467
+ // IE6-8 do not support the defaultView property so parent will be undefined
1468
+ if ( parent && parent.attachEvent && parent !== parent.top ) {
1514
1469
  parent.attachEvent( "onbeforeunload", function() {
1515
1470
  setDocument();
1516
1471
  });
@@ -1522,32 +1477,10 @@ setDocument = Sizzle.setDocument = function( node ) {
1522
1477
  // Support: IE<8
1523
1478
  // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
1524
1479
  support.attributes = assert(function( div ) {
1525
-
1526
- // Support: IE<8
1527
- // Prevent attribute/property "interpolation"
1528
- div.innerHTML = "<a href='#'></a>";
1529
- addHandle( "type|href|height|width", interpolationHandler, div.firstChild.getAttribute("href") === "#" );
1530
-
1531
- // Support: IE<9
1532
- // Use getAttributeNode to fetch booleans when getAttribute lies
1533
- addHandle( booleans, boolHandler, div.getAttribute("disabled") == null );
1534
-
1535
1480
  div.className = "i";
1536
1481
  return !div.getAttribute("className");
1537
1482
  });
1538
1483
 
1539
- // Support: IE<9
1540
- // Retrieving value should defer to defaultValue
1541
- support.input = assert(function( div ) {
1542
- div.innerHTML = "<input>";
1543
- div.firstChild.setAttribute( "value", "" );
1544
- return div.firstChild.getAttribute( "value" ) === "";
1545
- });
1546
-
1547
- // IE6/7 still return empty string for value,
1548
- // but are actually retrieving the property
1549
- addHandle( "value", valueHandler, support.attributes && support.input );
1550
-
1551
1484
  /* getElement(s)By*
1552
1485
  ---------------------------------------------------------------------- */
1553
1486
 
@@ -1656,7 +1589,7 @@ setDocument = Sizzle.setDocument = function( node ) {
1656
1589
  // See http://bugs.jquery.com/ticket/13378
1657
1590
  rbuggyQSA = [];
1658
1591
 
1659
- if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
1592
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
1660
1593
  // Build QSA regex
1661
1594
  // Regex strategy adopted from Diego Perini
1662
1595
  assert(function( div ) {
@@ -1708,7 +1641,7 @@ setDocument = Sizzle.setDocument = function( node ) {
1708
1641
  });
1709
1642
  }
1710
1643
 
1711
- if ( (support.matchesSelector = isNative( (matches = docElem.webkitMatchesSelector ||
1644
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
1712
1645
  docElem.mozMatchesSelector ||
1713
1646
  docElem.oMatchesSelector ||
1714
1647
  docElem.msMatchesSelector) )) ) {
@@ -1734,7 +1667,7 @@ setDocument = Sizzle.setDocument = function( node ) {
1734
1667
  // Element contains another
1735
1668
  // Purposefully does not implement inclusive descendent
1736
1669
  // As in, an element does not contain itself
1737
- contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
1670
+ contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
1738
1671
  function( a, b ) {
1739
1672
  var adown = a.nodeType === 9 ? a.documentElement : a,
1740
1673
  bup = b && b.parentNode;
@@ -1758,13 +1691,6 @@ setDocument = Sizzle.setDocument = function( node ) {
1758
1691
  /* Sorting
1759
1692
  ---------------------------------------------------------------------- */
1760
1693
 
1761
- // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
1762
- // Detached nodes confoundingly follow *each other*
1763
- support.sortDetached = assert(function( div1 ) {
1764
- // Should return 1, but returns 4 (following)
1765
- return div1.compareDocumentPosition( doc.createElement("div") ) & 1;
1766
- });
1767
-
1768
1694
  // Document order sorting
1769
1695
  sortOrder = docElem.compareDocumentPosition ?
1770
1696
  function( a, b ) {
@@ -1907,9 +1833,9 @@ Sizzle.attr = function( elem, name ) {
1907
1833
 
1908
1834
  var fn = Expr.attrHandle[ name.toLowerCase() ],
1909
1835
  // Don't get fooled by Object.prototype properties (jQuery #13807)
1910
- val = ( fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1836
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
1911
1837
  fn( elem, name, !documentIsHTML ) :
1912
- undefined );
1838
+ undefined;
1913
1839
 
1914
1840
  return val === undefined ?
1915
1841
  support.attributes || !documentIsHTML ?
@@ -2454,6 +2380,8 @@ Expr = Sizzle.selectors = {
2454
2380
  }
2455
2381
  };
2456
2382
 
2383
+ Expr.pseudos["nth"] = Expr.pseudos["eq"];
2384
+
2457
2385
  // Add button/input type pseudos
2458
2386
  for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
2459
2387
  Expr.pseudos[ i ] = createInputPseudo( i );
@@ -2462,6 +2390,11 @@ for ( i in { submit: true, reset: true } ) {
2462
2390
  Expr.pseudos[ i ] = createButtonPseudo( i );
2463
2391
  }
2464
2392
 
2393
+ // Easy API for creating new setFilters
2394
+ function setFilters() {}
2395
+ setFilters.prototype = Expr.filters = Expr.pseudos;
2396
+ Expr.setFilters = new setFilters();
2397
+
2465
2398
  function tokenize( selector, parseOnly ) {
2466
2399
  var matched, match, tokens, type,
2467
2400
  soFar, groups, preFilters,
@@ -2973,26 +2906,67 @@ function select( selector, context, results, seed ) {
2973
2906
  return results;
2974
2907
  }
2975
2908
 
2976
- // Deprecated
2977
- Expr.pseudos["nth"] = Expr.pseudos["eq"];
2978
-
2979
- // Easy API for creating new setFilters
2980
- function setFilters() {}
2981
- setFilters.prototype = Expr.filters = Expr.pseudos;
2982
- Expr.setFilters = new setFilters();
2983
-
2984
2909
  // One-time assignments
2985
2910
 
2986
2911
  // Sort stability
2987
2912
  support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
2988
2913
 
2914
+ // Support: Chrome<14
2915
+ // Always assume duplicates if they aren't passed to the comparison function
2916
+ support.detectDuplicates = hasDuplicate;
2917
+
2989
2918
  // Initialize against the default document
2990
2919
  setDocument();
2991
2920
 
2992
- // Support: Chrome<<14
2993
- // Always assume duplicates if they aren't passed to the comparison function
2994
- [0, 0].sort( sortOrder );
2995
- support.detectDuplicates = hasDuplicate;
2921
+ // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
2922
+ // Detached nodes confoundingly follow *each other*
2923
+ support.sortDetached = assert(function( div1 ) {
2924
+ // Should return 1, but returns 4 (following)
2925
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
2926
+ });
2927
+
2928
+ // Support: IE<8
2929
+ // Prevent attribute/property "interpolation"
2930
+ // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
2931
+ if ( !assert(function( div ) {
2932
+ div.innerHTML = "<a href='#'></a>";
2933
+ return div.firstChild.getAttribute("href") === "#" ;
2934
+ }) ) {
2935
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
2936
+ if ( !isXML ) {
2937
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
2938
+ }
2939
+ });
2940
+ }
2941
+
2942
+ // Support: IE<9
2943
+ // Use defaultValue in place of getAttribute("value")
2944
+ if ( !support.attributes || !assert(function( div ) {
2945
+ div.innerHTML = "<input/>";
2946
+ div.firstChild.setAttribute( "value", "" );
2947
+ return div.firstChild.getAttribute( "value" ) === "";
2948
+ }) ) {
2949
+ addHandle( "value", function( elem, name, isXML ) {
2950
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
2951
+ return elem.defaultValue;
2952
+ }
2953
+ });
2954
+ }
2955
+
2956
+ // Support: IE<9
2957
+ // Use getAttributeNode to fetch booleans when getAttribute lies
2958
+ if ( !assert(function( div ) {
2959
+ return div.getAttribute("disabled") == null;
2960
+ }) ) {
2961
+ addHandle( booleans, function( elem, name, isXML ) {
2962
+ var val;
2963
+ if ( !isXML ) {
2964
+ return (val = elem.getAttributeNode( name )) && val.specified ?
2965
+ val.value :
2966
+ elem[ name ] === true ? name.toLowerCase() : null;
2967
+ }
2968
+ });
2969
+ }
2996
2970
 
2997
2971
  jQuery.find = Sizzle;
2998
2972
  jQuery.expr = Sizzle.selectors;
@@ -3177,9 +3151,9 @@ jQuery.Callbacks = function( options ) {
3177
3151
  },
3178
3152
  // Call all callbacks with the given context and arguments
3179
3153
  fireWith: function( context, args ) {
3180
- args = args || [];
3181
- args = [ context, args.slice ? args.slice() : args ];
3182
3154
  if ( list && ( !fired || stack ) ) {
3155
+ args = args || [];
3156
+ args = [ context, args.slice ? args.slice() : args ];
3183
3157
  if ( firing ) {
3184
3158
  stack.push( args );
3185
3159
  } else {
@@ -4183,8 +4157,11 @@ jQuery.fn.extend({
4183
4157
  },
4184
4158
 
4185
4159
  toggleClass: function( value, stateVal ) {
4186
- var type = typeof value,
4187
- isBool = typeof stateVal === "boolean";
4160
+ var type = typeof value;
4161
+
4162
+ if ( typeof stateVal === "boolean" && type === "string" ) {
4163
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
4164
+ }
4188
4165
 
4189
4166
  if ( jQuery.isFunction( value ) ) {
4190
4167
  return this.each(function( i ) {
@@ -4198,13 +4175,15 @@ jQuery.fn.extend({
4198
4175
  var className,
4199
4176
  i = 0,
4200
4177
  self = jQuery( this ),
4201
- state = stateVal,
4202
4178
  classNames = value.match( core_rnotwhite ) || [];
4203
4179
 
4204
4180
  while ( (className = classNames[ i++ ]) ) {
4205
4181
  // check each className given, space separated list
4206
- state = isBool ? state : !self.hasClass( className );
4207
- self[ state ? "addClass" : "removeClass" ]( className );
4182
+ if ( self.hasClass( className ) ) {
4183
+ self.removeClass( className );
4184
+ } else {
4185
+ self.addClass( className );
4186
+ }
4208
4187
  }
4209
4188
 
4210
4189
  // Toggle whole class name
@@ -6948,10 +6927,12 @@ jQuery.fn.extend({
6948
6927
  return showHide( this );
6949
6928
  },
6950
6929
  toggle: function( state ) {
6951
- var bool = typeof state === "boolean";
6930
+ if ( typeof state === "boolean" ) {
6931
+ return state ? this.show() : this.hide();
6932
+ }
6952
6933
 
6953
6934
  return this.each(function() {
6954
- if ( bool ? state : isHidden( this ) ) {
6935
+ if ( isHidden( this ) ) {
6955
6936
  jQuery( this ).show();
6956
6937
  } else {
6957
6938
  jQuery( this ).hide();
@@ -6982,6 +6963,7 @@ jQuery.extend({
6982
6963
  "fontWeight": true,
6983
6964
  "lineHeight": true,
6984
6965
  "opacity": true,
6966
+ "order": true,
6985
6967
  "orphans": true,
6986
6968
  "widows": true,
6987
6969
  "zIndex": true,