zurb-foundation 4.2.3 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/CONTRIBUTING.md +1 -1
  2. data/Gemfile.lock +1 -1
  3. data/README.md +8 -0
  4. data/docs/CHANGELOG.md +17 -0
  5. data/docs/README.md +3 -1
  6. data/docs/_sidebar-components.html.erb +2 -1
  7. data/docs/_sidebar.html.erb +2 -1
  8. data/docs/compile.rb +8 -1
  9. data/docs/components/abide.html.erb +371 -0
  10. data/docs/components/alert-boxes.html.erb +12 -9
  11. data/docs/components/block-grid.html.erb +1 -1
  12. data/docs/components/breadcrumbs.html.erb +7 -5
  13. data/docs/components/button-groups.html.erb +4 -2
  14. data/docs/components/buttons.html.erb +13 -9
  15. data/docs/components/clearing.html.erb +2 -0
  16. data/docs/components/dropdown-buttons.html.erb +59 -55
  17. data/docs/components/dropdown.html.erb +34 -32
  18. data/docs/components/flex-video.html.erb +4 -2
  19. data/docs/components/forms.html.erb +16 -15
  20. data/docs/components/global.html.erb +27 -4
  21. data/docs/components/grid.html.erb +21 -3
  22. data/docs/components/inline-lists.html.erb +8 -3
  23. data/docs/components/joyride.html.erb +5 -3
  24. data/docs/components/keystrokes.html.erb +4 -2
  25. data/docs/components/kitchen-sink.html.erb +15 -40
  26. data/docs/components/labels.html.erb +4 -2
  27. data/docs/components/magellan.html.erb +4 -2
  28. data/docs/components/orbit.html.erb +39 -27
  29. data/docs/components/pagination.html.erb +10 -8
  30. data/docs/components/panels.html.erb +7 -3
  31. data/docs/components/pricing-tables.html.erb +12 -10
  32. data/docs/components/progress-bars.html.erb +6 -4
  33. data/docs/components/reveal.html.erb +7 -28
  34. data/docs/components/section.html.erb +15 -13
  35. data/docs/components/side-nav.html.erb +5 -3
  36. data/docs/components/split-buttons.html.erb +45 -43
  37. data/docs/components/sub-nav.html.erb +7 -5
  38. data/docs/components/switch.html.erb +3 -1
  39. data/docs/components/tables.html.erb +8 -6
  40. data/docs/components/thumbnails.html.erb +2 -0
  41. data/docs/components/tooltips.html.erb +6 -4
  42. data/docs/components/top-bar.html.erb +9 -8
  43. data/docs/components/type.html.erb +20 -18
  44. data/docs/config.ru +2 -1
  45. data/docs/css/_footer.scss +420 -0
  46. data/docs/css/_offcanvas.scss +140 -0
  47. data/docs/css/docs.scss +10 -1
  48. data/docs/fonts/ProximaNova-Reg-webfont.eot +0 -0
  49. data/docs/fonts/ProximaNova-Reg-webfont.svg +244 -0
  50. data/docs/fonts/ProximaNova-Reg-webfont.ttf +0 -0
  51. data/docs/fonts/ProximaNova-Reg-webfont.woff +0 -0
  52. data/docs/fonts/proximanovacond-bold-webfont.eot +0 -0
  53. data/docs/fonts/proximanovacond-bold-webfont.svg +247 -0
  54. data/docs/fonts/proximanovacond-bold-webfont.ttf +0 -0
  55. data/docs/fonts/proximanovacond-bold-webfont.woff +0 -0
  56. data/docs/img/demos/orbit/demo1.jpg +0 -0
  57. data/docs/img/demos/orbit/demo2.jpg +0 -0
  58. data/docs/img/demos/orbit/demo3.jpg +0 -0
  59. data/docs/img/icons/footer-icons.png +0 -0
  60. data/docs/img/icons/footer-top-icons.png +0 -0
  61. data/docs/img/icons/social.png +0 -0
  62. data/docs/img/offcanvas/footer-icons.png +0 -0
  63. data/docs/img/offcanvas/menu-wht.png +0 -0
  64. data/docs/img/offcanvas/search.png +0 -0
  65. data/docs/img/offcanvas/zurb-logo.png +0 -0
  66. data/docs/img/offcanvas/zurb-wht.png +0 -0
  67. data/docs/js/docs.js +1 -0
  68. data/docs/js/jquery.offcanvas.js +28 -0
  69. data/docs/layout.html.erb +226 -42
  70. data/docs/media-queries.html.erb +3 -3
  71. data/docs/sass.html.erb +142 -142
  72. data/docs/support.html.erb +1 -1
  73. data/js/foundation/foundation.abide.js +194 -0
  74. data/js/foundation/foundation.dropdown.js +8 -9
  75. data/js/foundation/foundation.forms.js +11 -3
  76. data/js/foundation/foundation.interchange.js +25 -16
  77. data/js/foundation/foundation.joyride.js +9 -3
  78. data/js/foundation/foundation.js +2 -3
  79. data/js/foundation/foundation.magellan.js +3 -2
  80. data/js/foundation/foundation.orbit.js +359 -344
  81. data/js/foundation/foundation.reveal.js +1 -1
  82. data/js/foundation/foundation.section.js +290 -311
  83. data/js/foundation/foundation.tooltips.js +2 -2
  84. data/js/foundation/foundation.topbar.js +20 -23
  85. data/js/foundation/index.js +1 -0
  86. data/js/vendor/jquery.js +103 -121
  87. data/lib/foundation/generators/templates/application.html.slim +15 -8
  88. data/lib/foundation/version.rb +1 -1
  89. data/scss/foundation.scss +2 -5
  90. data/scss/foundation/_variables.scss +326 -295
  91. data/scss/foundation/components/_alert-boxes.scss +10 -10
  92. data/scss/foundation/components/_block-grid.scss +1 -1
  93. data/scss/foundation/components/_breadcrumbs.scss +8 -8
  94. data/scss/foundation/components/_button-groups.scss +2 -2
  95. data/scss/foundation/components/_buttons.scss +18 -18
  96. data/scss/foundation/components/_custom-forms.scss +20 -14
  97. data/scss/foundation/components/_dropdown-buttons.scss +9 -9
  98. data/scss/foundation/components/_dropdown.scss +4 -4
  99. data/scss/foundation/components/_flex-video.scss +3 -3
  100. data/scss/foundation/components/_forms.scss +54 -24
  101. data/scss/foundation/components/_global.scss +28 -5
  102. data/scss/foundation/components/_grid-5.scss +214 -0
  103. data/scss/foundation/components/_grid.scss +3 -3
  104. data/scss/foundation/components/_inline-lists.scss +3 -3
  105. data/scss/foundation/components/_joyride.scss +6 -6
  106. data/scss/foundation/components/_keystrokes.scss +3 -3
  107. data/scss/foundation/components/_labels.scss +3 -3
  108. data/scss/foundation/components/_orbit.scss +34 -9
  109. data/scss/foundation/components/_pagination.scss +8 -6
  110. data/scss/foundation/components/_panels.scss +3 -3
  111. data/scss/foundation/components/_pricing-tables.scss +10 -10
  112. data/scss/foundation/components/_progress-bars.scss +3 -3
  113. data/scss/foundation/components/_reveal.scss +7 -7
  114. data/scss/foundation/components/_section.scss +252 -214
  115. data/scss/foundation/components/_side-nav.scss +3 -3
  116. data/scss/foundation/components/_split-buttons.scss +7 -7
  117. data/scss/foundation/components/_sub-nav.scss +7 -7
  118. data/scss/foundation/components/_switch.scss +4 -4
  119. data/scss/foundation/components/_tables.scss +6 -6
  120. data/scss/foundation/components/_tooltips.scss +4 -4
  121. data/scss/foundation/components/_top-bar.scss +14 -10
  122. data/scss/foundation/components/_type.scss +23 -23
  123. data/templates/project/index.html +4 -4
  124. data/templates/project/scss/app.scss +8 -0
  125. metadata +29 -4
@@ -4,7 +4,7 @@
4
4
  'use strict';
5
5
 
6
6
  Foundation.libs.tooltips = {
7
- name: 'tooltips',
7
+ name : 'tooltips',
8
8
 
9
9
  version : '4.2.2',
10
10
 
@@ -205,4 +205,4 @@
205
205
 
206
206
  reflow : function () {}
207
207
  };
208
- }(Foundation.zj, this, this.document));
208
+ }(Foundation.zj, this, this.document));
@@ -6,7 +6,7 @@
6
6
  Foundation.libs.topbar = {
7
7
  name : 'topbar',
8
8
 
9
- version : '4.2.3',
9
+ version : '4.3.0',
10
10
 
11
11
  settings : {
12
12
  index : 0,
@@ -14,6 +14,7 @@
14
14
  custom_back_text: true,
15
15
  back_text: 'Back',
16
16
  is_hover: true,
17
+ mobile_show_parent_link: true,
17
18
  scrolltop : true, // jump to top when sticky nav menu toggle is clicked
18
19
  init : false
19
20
  },
@@ -44,6 +45,10 @@
44
45
 
45
46
  self.assemble();
46
47
 
48
+ if (self.settings.is_hover) {
49
+ self.settings.$topbar.find('.has-dropdown').addClass('not-click');
50
+ }
51
+
47
52
  if (self.settings.$topbar.parent().hasClass('fixed')) {
48
53
  $('body').css('padding-top', self.outerHeight(self.settings.$topbar));
49
54
  }
@@ -60,6 +65,8 @@
60
65
  }
61
66
  },
62
67
 
68
+ timer : null,
69
+
63
70
  events : function () {
64
71
  var self = this;
65
72
  var offst = this.outerHeight($('.top-bar, [data-topbar]'));
@@ -106,16 +113,6 @@
106
113
  }
107
114
  })
108
115
 
109
- .on('mouseenter mouseleave', '.top-bar li', function (e) {
110
- if (!self.settings.is_hover) return;
111
-
112
- if (/enter|over/i.test(e.type)) {
113
- $(this).addClass('hover');
114
- } else {
115
- $(this).removeClass('hover');
116
- }
117
- })
118
-
119
116
  .on('click.fndtn.topbar', '.top-bar li.has-dropdown', function (e) {
120
117
  if (self.breakpoint()) return;
121
118
 
@@ -235,7 +232,7 @@
235
232
  $dropdown = $link.siblings('.dropdown'),
236
233
  url = $link.attr('href');
237
234
 
238
- if (url && url.length > 1) {
235
+ if (self.settings.mobile_show_parent_link && url && url.length > 1) {
239
236
  var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
240
237
  } else {
241
238
  var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');
@@ -270,22 +267,22 @@
270
267
  var klass = '.' + this.settings.stickyClass;
271
268
  if ($(klass).length > 0) {
272
269
  var distance = $(klass).length ? $(klass).offset().top: 0,
273
- $window = $(window);
274
- var offst = this.outerHeight($('.top-bar'));
275
- //Whe resize elements of the page on windows resize. Must recalculate distance
276
- $(window).resize(function() {
270
+ $window = $(window),
271
+ offst = this.outerHeight($('.top-bar')),
272
+ t_top;
273
+
274
+ //Whe resize elements of the page on windows resize. Must recalculate distance
275
+ $(window).resize(function() {
277
276
  clearTimeout(t_top);
278
- t_top = setTimeout (function() {
279
- distance = $(klass).offset().top;
280
- },105);
281
- });
277
+ t_top = setTimeout (function() {
278
+ distance = $(klass).offset().top;
279
+ },105);
280
+ });
282
281
  $window.scroll(function() {
283
282
  if ($window.scrollTop() > (distance)) {
284
283
  $(klass).addClass("fixed");
285
284
  $('body').css('padding-top',offst);
286
- }
287
-
288
- else if ($window.scrollTop() <= distance) {
285
+ } else if ($window.scrollTop() <= distance) {
289
286
  $(klass).removeClass("fixed");
290
287
  $('body').css('padding-top','0');
291
288
  }
@@ -14,4 +14,5 @@
14
14
  =require foundation/foundation.topbar
15
15
  =require foundation/foundation.interchange
16
16
  =require foundation/foundation.placeholder
17
+ =require foundation/foundation.abide
17
18
  */
@@ -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,