try_api 0.0.10 → 0.0.11

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.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/try_api/application.js.coffee +0 -3
  3. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  4. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  5. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  6. data/app/assets/javascripts/try_api/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 +0 -0
  7. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  8. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  9. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  10. data/app/assets/javascripts/try_api/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
  11. data/app/assets/javascripts/try_api/bower_components/bootstrap/grunt/change-version.js +0 -0
  12. data/app/assets/javascripts/try_api/param.directive.js.coffee +9 -4
  13. data/app/models/try_api/menu_item.rb +0 -2
  14. data/app/models/try_api/method.rb +2 -2
  15. data/app/views/layouts/try_api/application.html.erb +4 -0
  16. data/app/views/try_api/pages/index.html +15 -10
  17. data/lib/try_api/version.rb +1 -1
  18. metadata +2 -138
  19. data/app/assets/javascripts/try_api/bower_components/jquery/AUTHORS.txt +0 -295
  20. data/app/assets/javascripts/try_api/bower_components/jquery/LICENSE.txt +0 -36
  21. data/app/assets/javascripts/try_api/bower_components/jquery/README.md +0 -65
  22. data/app/assets/javascripts/try_api/bower_components/jquery/bower.json +0 -14
  23. data/app/assets/javascripts/try_api/bower_components/jquery/dist/core.js +0 -481
  24. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.js +0 -10074
  25. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.min.js +0 -4
  26. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.slim.js +0 -7966
  27. data/app/assets/javascripts/try_api/bower_components/jquery/dist/jquery.slim.min.js +0 -4
  28. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/LICENSE.txt +0 -36
  29. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/dist/sizzle.js +0 -2217
  30. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  31. data/app/assets/javascripts/try_api/bower_components/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  32. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/jsonp.js +0 -102
  33. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/load.js +0 -75
  34. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/parseXML.js +0 -30
  35. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/script.js +0 -77
  36. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/var/location.js +0 -5
  37. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/var/nonce.js +0 -7
  38. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/var/rquery.js +0 -5
  39. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax/xhr.js +0 -169
  40. data/app/assets/javascripts/try_api/bower_components/jquery/src/ajax.js +0 -855
  41. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/attr.js +0 -137
  42. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/classes.js +0 -179
  43. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/prop.js +0 -128
  44. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/support.js +0 -33
  45. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes/val.js +0 -184
  46. data/app/assets/javascripts/try_api/bower_components/jquery/src/attributes.js +0 -13
  47. data/app/assets/javascripts/try_api/bower_components/jquery/src/callbacks.js +0 -234
  48. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/DOMEval.js +0 -16
  49. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/access.js +0 -67
  50. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/init.js +0 -127
  51. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/parseHTML.js +0 -65
  52. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/ready-no-deferred.js +0 -111
  53. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/ready.js +0 -95
  54. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/readyException.js +0 -13
  55. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/support.js +0 -20
  56. data/app/assets/javascripts/try_api/bower_components/jquery/src/core/var/rsingleTag.js +0 -6
  57. data/app/assets/javascripts/try_api/bower_components/jquery/src/core.js +0 -481
  58. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/addGetHookIf.js +0 -26
  59. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/adjustCSS.js +0 -71
  60. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/curCSS.js +0 -59
  61. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  62. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/showHide.js +0 -105
  63. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/support.js +0 -89
  64. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/cssExpand.js +0 -5
  65. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/getStyles.js +0 -17
  66. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/isHiddenWithinTree.js +0 -34
  67. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/rmargin.js +0 -5
  68. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/rnumnonpx.js +0 -7
  69. data/app/assets/javascripts/try_api/bower_components/jquery/src/css/var/swap.js +0 -26
  70. data/app/assets/javascripts/try_api/bower_components/jquery/src/css.js +0 -424
  71. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/Data.js +0 -161
  72. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/var/acceptData.js +0 -19
  73. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/var/dataPriv.js +0 -7
  74. data/app/assets/javascripts/try_api/bower_components/jquery/src/data/var/dataUser.js +0 -7
  75. data/app/assets/javascripts/try_api/bower_components/jquery/src/data.js +0 -161
  76. data/app/assets/javascripts/try_api/bower_components/jquery/src/deferred/exceptionHook.js +0 -21
  77. data/app/assets/javascripts/try_api/bower_components/jquery/src/deferred.js +0 -389
  78. data/app/assets/javascripts/try_api/bower_components/jquery/src/deprecated.js +0 -30
  79. data/app/assets/javascripts/try_api/bower_components/jquery/src/dimensions.js +0 -56
  80. data/app/assets/javascripts/try_api/bower_components/jquery/src/effects/Tween.js +0 -123
  81. data/app/assets/javascripts/try_api/bower_components/jquery/src/effects/animatedSelector.js +0 -15
  82. data/app/assets/javascripts/try_api/bower_components/jquery/src/effects.js +0 -688
  83. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/ajax.js +0 -22
  84. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/alias.js +0 -29
  85. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/focusin.js +0 -55
  86. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/support.js +0 -11
  87. data/app/assets/javascripts/try_api/bower_components/jquery/src/event/trigger.js +0 -185
  88. data/app/assets/javascripts/try_api/bower_components/jquery/src/event.js +0 -726
  89. data/app/assets/javascripts/try_api/bower_components/jquery/src/exports/amd.js +0 -26
  90. data/app/assets/javascripts/try_api/bower_components/jquery/src/exports/global.js +0 -34
  91. data/app/assets/javascripts/try_api/bower_components/jquery/src/jquery.js +0 -40
  92. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/_evalUrl.js +0 -23
  93. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/buildFragment.js +0 -104
  94. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/getAll.js +0 -23
  95. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/setGlobalEval.js +0 -22
  96. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/support.js +0 -35
  97. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/var/rcheckableType.js +0 -5
  98. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/var/rscriptType.js +0 -5
  99. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/var/rtagName.js +0 -5
  100. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation/wrapMap.js +0 -29
  101. data/app/assets/javascripts/try_api/bower_components/jquery/src/manipulation.js +0 -486
  102. data/app/assets/javascripts/try_api/bower_components/jquery/src/offset.js +0 -232
  103. data/app/assets/javascripts/try_api/bower_components/jquery/src/queue/delay.js +0 -24
  104. data/app/assets/javascripts/try_api/bower_components/jquery/src/queue.js +0 -145
  105. data/app/assets/javascripts/try_api/bower_components/jquery/src/selector-native.js +0 -237
  106. data/app/assets/javascripts/try_api/bower_components/jquery/src/selector-sizzle.js +0 -19
  107. data/app/assets/javascripts/try_api/bower_components/jquery/src/selector.js +0 -3
  108. data/app/assets/javascripts/try_api/bower_components/jquery/src/serialize.js +0 -126
  109. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/findFilter.js +0 -99
  110. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/var/dir.js +0 -22
  111. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/var/rneedsContext.js +0 -8
  112. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing/var/siblings.js +0 -17
  113. data/app/assets/javascripts/try_api/bower_components/jquery/src/traversing.js +0 -178
  114. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/ObjectFunctionString.js +0 -7
  115. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/arr.js +0 -5
  116. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/class2type.js +0 -6
  117. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/concat.js +0 -7
  118. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/document.js +0 -5
  119. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/documentElement.js +0 -7
  120. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/fnToString.js +0 -7
  121. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/getProto.js +0 -5
  122. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/hasOwn.js +0 -7
  123. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/indexOf.js +0 -7
  124. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/pnum.js +0 -5
  125. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/push.js +0 -7
  126. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/rcssNum.js +0 -9
  127. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/rnotwhite.js +0 -5
  128. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/slice.js +0 -7
  129. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/support.js +0 -6
  130. data/app/assets/javascripts/try_api/bower_components/jquery/src/var/toString.js +0 -7
  131. data/app/assets/javascripts/try_api/bower_components/jquery/src/wrap.js +0 -77
  132. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/README.md +0 -8
  133. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/bower.json +0 -46
  134. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/allow-page-scroll.html +0 -94
  135. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/chaining.html +0 -80
  136. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/disable-fade-out.html +0 -94
  137. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/dynamic-content.html +0 -81
  138. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/height-width.html +0 -125
  139. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/index.html +0 -9
  140. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/libs/prettify/prettify.css +0 -52
  141. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/libs/prettify/prettify.js +0 -1477
  142. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/mouse-wheel.html +0 -99
  143. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/multiple-elements.html +0 -120
  144. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/navigation.html +0 -30
  145. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/nested.html +0 -82
  146. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/programmatic-scrolling.html +0 -138
  147. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/rail.html +0 -190
  148. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/scroll-events.html +0 -88
  149. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/scrollbar.html +0 -189
  150. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/start-position.html +0 -100
  151. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/examples/style.css +0 -13
  152. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/jquery.slimscroll.js +0 -474
  153. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/jquery.slimscroll.min.js +0 -16
  154. data/app/assets/javascripts/try_api/bower_components/jquery-slimscroll/package.json +0 -32
@@ -1,137 +0,0 @@
1
- define( [
2
- "../core",
3
- "../core/access",
4
- "./support",
5
- "../var/rnotwhite",
6
- "../selector"
7
- ], function( jQuery, access, support, rnotwhite ) {
8
-
9
- "use strict";
10
-
11
- var boolHook,
12
- attrHandle = jQuery.expr.attrHandle;
13
-
14
- jQuery.fn.extend( {
15
- attr: function( name, value ) {
16
- return access( this, jQuery.attr, name, value, arguments.length > 1 );
17
- },
18
-
19
- removeAttr: function( name ) {
20
- return this.each( function() {
21
- jQuery.removeAttr( this, name );
22
- } );
23
- }
24
- } );
25
-
26
- jQuery.extend( {
27
- attr: function( elem, name, value ) {
28
- var ret, hooks,
29
- nType = elem.nodeType;
30
-
31
- // Don't get/set attributes on text, comment and attribute nodes
32
- if ( nType === 3 || nType === 8 || nType === 2 ) {
33
- return;
34
- }
35
-
36
- // Fallback to prop when attributes are not supported
37
- if ( typeof elem.getAttribute === "undefined" ) {
38
- return jQuery.prop( elem, name, value );
39
- }
40
-
41
- // Attribute hooks are determined by the lowercase version
42
- // Grab necessary hook if one is defined
43
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
44
- hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
45
- ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
46
- }
47
-
48
- if ( value !== undefined ) {
49
- if ( value === null ) {
50
- jQuery.removeAttr( elem, name );
51
- return;
52
- }
53
-
54
- if ( hooks && "set" in hooks &&
55
- ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
56
- return ret;
57
- }
58
-
59
- elem.setAttribute( name, value + "" );
60
- return value;
61
- }
62
-
63
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
64
- return ret;
65
- }
66
-
67
- ret = jQuery.find.attr( elem, name );
68
-
69
- // Non-existent attributes return null, we normalize to undefined
70
- return ret == null ? undefined : ret;
71
- },
72
-
73
- attrHooks: {
74
- type: {
75
- set: function( elem, value ) {
76
- if ( !support.radioValue && value === "radio" &&
77
- jQuery.nodeName( elem, "input" ) ) {
78
- var val = elem.value;
79
- elem.setAttribute( "type", value );
80
- if ( val ) {
81
- elem.value = val;
82
- }
83
- return value;
84
- }
85
- }
86
- }
87
- },
88
-
89
- removeAttr: function( elem, value ) {
90
- var name,
91
- i = 0,
92
- attrNames = value && value.match( rnotwhite );
93
-
94
- if ( attrNames && elem.nodeType === 1 ) {
95
- while ( ( name = attrNames[ i++ ] ) ) {
96
- elem.removeAttribute( name );
97
- }
98
- }
99
- }
100
- } );
101
-
102
- // Hooks for boolean attributes
103
- boolHook = {
104
- set: function( elem, value, name ) {
105
- if ( value === false ) {
106
-
107
- // Remove boolean attributes when set to false
108
- jQuery.removeAttr( elem, name );
109
- } else {
110
- elem.setAttribute( name, name );
111
- }
112
- return name;
113
- }
114
- };
115
-
116
- jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
117
- var getter = attrHandle[ name ] || jQuery.find.attr;
118
-
119
- attrHandle[ name ] = function( elem, name, isXML ) {
120
- var ret, handle,
121
- lowercaseName = name.toLowerCase();
122
-
123
- if ( !isXML ) {
124
-
125
- // Avoid an infinite loop by temporarily removing this function from the getter
126
- handle = attrHandle[ lowercaseName ];
127
- attrHandle[ lowercaseName ] = ret;
128
- ret = getter( elem, name, isXML ) != null ?
129
- lowercaseName :
130
- null;
131
- attrHandle[ lowercaseName ] = handle;
132
- }
133
- return ret;
134
- };
135
- } );
136
-
137
- } );
@@ -1,179 +0,0 @@
1
- define( [
2
- "../core",
3
- "../var/rnotwhite",
4
- "../data/var/dataPriv",
5
- "../core/init"
6
- ], function( jQuery, rnotwhite, dataPriv ) {
7
-
8
- "use strict";
9
-
10
- var rclass = /[\t\r\n\f]/g;
11
-
12
- function getClass( elem ) {
13
- return elem.getAttribute && elem.getAttribute( "class" ) || "";
14
- }
15
-
16
- jQuery.fn.extend( {
17
- addClass: function( value ) {
18
- var classes, elem, cur, curValue, clazz, j, finalValue,
19
- i = 0;
20
-
21
- if ( jQuery.isFunction( value ) ) {
22
- return this.each( function( j ) {
23
- jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
24
- } );
25
- }
26
-
27
- if ( typeof value === "string" && value ) {
28
- classes = value.match( rnotwhite ) || [];
29
-
30
- while ( ( elem = this[ i++ ] ) ) {
31
- curValue = getClass( elem );
32
- cur = elem.nodeType === 1 &&
33
- ( " " + curValue + " " ).replace( rclass, " " );
34
-
35
- if ( cur ) {
36
- j = 0;
37
- while ( ( clazz = classes[ j++ ] ) ) {
38
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
39
- cur += clazz + " ";
40
- }
41
- }
42
-
43
- // Only assign if different to avoid unneeded rendering.
44
- finalValue = jQuery.trim( cur );
45
- if ( curValue !== finalValue ) {
46
- elem.setAttribute( "class", finalValue );
47
- }
48
- }
49
- }
50
- }
51
-
52
- return this;
53
- },
54
-
55
- removeClass: function( value ) {
56
- var classes, elem, cur, curValue, clazz, j, finalValue,
57
- i = 0;
58
-
59
- if ( jQuery.isFunction( value ) ) {
60
- return this.each( function( j ) {
61
- jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
62
- } );
63
- }
64
-
65
- if ( !arguments.length ) {
66
- return this.attr( "class", "" );
67
- }
68
-
69
- if ( typeof value === "string" && value ) {
70
- classes = value.match( rnotwhite ) || [];
71
-
72
- while ( ( elem = this[ i++ ] ) ) {
73
- curValue = getClass( elem );
74
-
75
- // This expression is here for better compressibility (see addClass)
76
- cur = elem.nodeType === 1 &&
77
- ( " " + curValue + " " ).replace( rclass, " " );
78
-
79
- if ( cur ) {
80
- j = 0;
81
- while ( ( clazz = classes[ j++ ] ) ) {
82
-
83
- // Remove *all* instances
84
- while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
85
- cur = cur.replace( " " + clazz + " ", " " );
86
- }
87
- }
88
-
89
- // Only assign if different to avoid unneeded rendering.
90
- finalValue = jQuery.trim( cur );
91
- if ( curValue !== finalValue ) {
92
- elem.setAttribute( "class", finalValue );
93
- }
94
- }
95
- }
96
- }
97
-
98
- return this;
99
- },
100
-
101
- toggleClass: function( value, stateVal ) {
102
- var type = typeof value;
103
-
104
- if ( typeof stateVal === "boolean" && type === "string" ) {
105
- return stateVal ? this.addClass( value ) : this.removeClass( value );
106
- }
107
-
108
- if ( jQuery.isFunction( value ) ) {
109
- return this.each( function( i ) {
110
- jQuery( this ).toggleClass(
111
- value.call( this, i, getClass( this ), stateVal ),
112
- stateVal
113
- );
114
- } );
115
- }
116
-
117
- return this.each( function() {
118
- var className, i, self, classNames;
119
-
120
- if ( type === "string" ) {
121
-
122
- // Toggle individual class names
123
- i = 0;
124
- self = jQuery( this );
125
- classNames = value.match( rnotwhite ) || [];
126
-
127
- while ( ( className = classNames[ i++ ] ) ) {
128
-
129
- // Check each className given, space separated list
130
- if ( self.hasClass( className ) ) {
131
- self.removeClass( className );
132
- } else {
133
- self.addClass( className );
134
- }
135
- }
136
-
137
- // Toggle whole class name
138
- } else if ( value === undefined || type === "boolean" ) {
139
- className = getClass( this );
140
- if ( className ) {
141
-
142
- // Store className if set
143
- dataPriv.set( this, "__className__", className );
144
- }
145
-
146
- // If the element has a class name or if we're passed `false`,
147
- // then remove the whole classname (if there was one, the above saved it).
148
- // Otherwise bring back whatever was previously saved (if anything),
149
- // falling back to the empty string if nothing was stored.
150
- if ( this.setAttribute ) {
151
- this.setAttribute( "class",
152
- className || value === false ?
153
- "" :
154
- dataPriv.get( this, "__className__" ) || ""
155
- );
156
- }
157
- }
158
- } );
159
- },
160
-
161
- hasClass: function( selector ) {
162
- var className, elem,
163
- i = 0;
164
-
165
- className = " " + selector + " ";
166
- while ( ( elem = this[ i++ ] ) ) {
167
- if ( elem.nodeType === 1 &&
168
- ( " " + getClass( elem ) + " " ).replace( rclass, " " )
169
- .indexOf( className ) > -1
170
- ) {
171
- return true;
172
- }
173
- }
174
-
175
- return false;
176
- }
177
- } );
178
-
179
- } );
@@ -1,128 +0,0 @@
1
- define( [
2
- "../core",
3
- "../core/access",
4
- "./support",
5
- "../selector"
6
- ], function( jQuery, access, support ) {
7
-
8
- "use strict";
9
-
10
- var rfocusable = /^(?:input|select|textarea|button)$/i,
11
- rclickable = /^(?:a|area)$/i;
12
-
13
- jQuery.fn.extend( {
14
- prop: function( name, value ) {
15
- return access( this, jQuery.prop, name, value, arguments.length > 1 );
16
- },
17
-
18
- removeProp: function( name ) {
19
- return this.each( function() {
20
- delete this[ jQuery.propFix[ name ] || name ];
21
- } );
22
- }
23
- } );
24
-
25
- jQuery.extend( {
26
- prop: function( elem, name, value ) {
27
- var ret, hooks,
28
- nType = elem.nodeType;
29
-
30
- // Don't get/set properties on text, comment and attribute nodes
31
- if ( nType === 3 || nType === 8 || nType === 2 ) {
32
- return;
33
- }
34
-
35
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
36
-
37
- // Fix name and attach hooks
38
- name = jQuery.propFix[ name ] || name;
39
- hooks = jQuery.propHooks[ name ];
40
- }
41
-
42
- if ( value !== undefined ) {
43
- if ( hooks && "set" in hooks &&
44
- ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
45
- return ret;
46
- }
47
-
48
- return ( elem[ name ] = value );
49
- }
50
-
51
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
52
- return ret;
53
- }
54
-
55
- return elem[ name ];
56
- },
57
-
58
- propHooks: {
59
- tabIndex: {
60
- get: function( elem ) {
61
-
62
- // Support: IE <=9 - 11 only
63
- // elem.tabIndex doesn't always return the
64
- // correct value when it hasn't been explicitly set
65
- // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
66
- // Use proper attribute retrieval(#12072)
67
- var tabindex = jQuery.find.attr( elem, "tabindex" );
68
-
69
- return tabindex ?
70
- parseInt( tabindex, 10 ) :
71
- rfocusable.test( elem.nodeName ) ||
72
- rclickable.test( elem.nodeName ) && elem.href ?
73
- 0 :
74
- -1;
75
- }
76
- }
77
- },
78
-
79
- propFix: {
80
- "for": "htmlFor",
81
- "class": "className"
82
- }
83
- } );
84
-
85
- // Support: IE <=11 only
86
- // Accessing the selectedIndex property
87
- // forces the browser to respect setting selected
88
- // on the option
89
- // The getter ensures a default option is selected
90
- // when in an optgroup
91
- if ( !support.optSelected ) {
92
- jQuery.propHooks.selected = {
93
- get: function( elem ) {
94
- var parent = elem.parentNode;
95
- if ( parent && parent.parentNode ) {
96
- parent.parentNode.selectedIndex;
97
- }
98
- return null;
99
- },
100
- set: function( elem ) {
101
- var parent = elem.parentNode;
102
- if ( parent ) {
103
- parent.selectedIndex;
104
-
105
- if ( parent.parentNode ) {
106
- parent.parentNode.selectedIndex;
107
- }
108
- }
109
- }
110
- };
111
- }
112
-
113
- jQuery.each( [
114
- "tabIndex",
115
- "readOnly",
116
- "maxLength",
117
- "cellSpacing",
118
- "cellPadding",
119
- "rowSpan",
120
- "colSpan",
121
- "useMap",
122
- "frameBorder",
123
- "contentEditable"
124
- ], function() {
125
- jQuery.propFix[ this.toLowerCase() ] = this;
126
- } );
127
-
128
- } );
@@ -1,33 +0,0 @@
1
- define( [
2
- "../var/document",
3
- "../var/support"
4
- ], function( document, support ) {
5
-
6
- "use strict";
7
-
8
- ( function() {
9
- var input = document.createElement( "input" ),
10
- select = document.createElement( "select" ),
11
- opt = select.appendChild( document.createElement( "option" ) );
12
-
13
- input.type = "checkbox";
14
-
15
- // Support: Android <=4.3 only
16
- // Default value for a checkbox should be "on"
17
- support.checkOn = input.value !== "";
18
-
19
- // Support: IE <=11 only
20
- // Must access selectedIndex to make default options select
21
- support.optSelected = opt.selected;
22
-
23
- // Support: IE <=11 only
24
- // An input loses its value after becoming a radio
25
- input = document.createElement( "input" );
26
- input.value = "t";
27
- input.type = "radio";
28
- support.radioValue = input.value === "t";
29
- } )();
30
-
31
- return support;
32
-
33
- } );
@@ -1,184 +0,0 @@
1
- define( [
2
- "../core",
3
- "./support",
4
- "../core/init"
5
- ], function( jQuery, support ) {
6
-
7
- "use strict";
8
-
9
- var rreturn = /\r/g,
10
- rspaces = /[\x20\t\r\n\f]+/g;
11
-
12
- jQuery.fn.extend( {
13
- val: function( value ) {
14
- var hooks, ret, isFunction,
15
- elem = this[ 0 ];
16
-
17
- if ( !arguments.length ) {
18
- if ( elem ) {
19
- hooks = jQuery.valHooks[ elem.type ] ||
20
- jQuery.valHooks[ elem.nodeName.toLowerCase() ];
21
-
22
- if ( hooks &&
23
- "get" in hooks &&
24
- ( ret = hooks.get( elem, "value" ) ) !== undefined
25
- ) {
26
- return ret;
27
- }
28
-
29
- ret = elem.value;
30
-
31
- return typeof ret === "string" ?
32
-
33
- // Handle most common string cases
34
- ret.replace( rreturn, "" ) :
35
-
36
- // Handle cases where value is null/undef or number
37
- ret == null ? "" : ret;
38
- }
39
-
40
- return;
41
- }
42
-
43
- isFunction = jQuery.isFunction( value );
44
-
45
- return this.each( function( i ) {
46
- var val;
47
-
48
- if ( this.nodeType !== 1 ) {
49
- return;
50
- }
51
-
52
- if ( isFunction ) {
53
- val = value.call( this, i, jQuery( this ).val() );
54
- } else {
55
- val = value;
56
- }
57
-
58
- // Treat null/undefined as ""; convert numbers to string
59
- if ( val == null ) {
60
- val = "";
61
-
62
- } else if ( typeof val === "number" ) {
63
- val += "";
64
-
65
- } else if ( jQuery.isArray( val ) ) {
66
- val = jQuery.map( val, function( value ) {
67
- return value == null ? "" : value + "";
68
- } );
69
- }
70
-
71
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
72
-
73
- // If set returns undefined, fall back to normal setting
74
- if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
75
- this.value = val;
76
- }
77
- } );
78
- }
79
- } );
80
-
81
- jQuery.extend( {
82
- valHooks: {
83
- option: {
84
- get: function( elem ) {
85
-
86
- var val = jQuery.find.attr( elem, "value" );
87
- return val != null ?
88
- val :
89
-
90
- // Support: IE <=10 - 11 only
91
- // option.text throws exceptions (#14686, #14858)
92
- // Strip and collapse whitespace
93
- // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
94
- jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
95
- }
96
- },
97
- select: {
98
- get: function( elem ) {
99
- var value, option,
100
- options = elem.options,
101
- index = elem.selectedIndex,
102
- one = elem.type === "select-one",
103
- values = one ? null : [],
104
- max = one ? index + 1 : options.length,
105
- i = index < 0 ?
106
- max :
107
- one ? index : 0;
108
-
109
- // Loop through all the selected options
110
- for ( ; i < max; i++ ) {
111
- option = options[ i ];
112
-
113
- // Support: IE <=9 only
114
- // IE8-9 doesn't update selected after form reset (#2551)
115
- if ( ( option.selected || i === index ) &&
116
-
117
- // Don't return options that are disabled or in a disabled optgroup
118
- !option.disabled &&
119
- ( !option.parentNode.disabled ||
120
- !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
121
-
122
- // Get the specific value for the option
123
- value = jQuery( option ).val();
124
-
125
- // We don't need an array for one selects
126
- if ( one ) {
127
- return value;
128
- }
129
-
130
- // Multi-Selects return an array
131
- values.push( value );
132
- }
133
- }
134
-
135
- return values;
136
- },
137
-
138
- set: function( elem, value ) {
139
- var optionSet, option,
140
- options = elem.options,
141
- values = jQuery.makeArray( value ),
142
- i = options.length;
143
-
144
- while ( i-- ) {
145
- option = options[ i ];
146
-
147
- /* eslint-disable no-cond-assign */
148
-
149
- if ( option.selected =
150
- jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
151
- ) {
152
- optionSet = true;
153
- }
154
-
155
- /* eslint-enable no-cond-assign */
156
- }
157
-
158
- // Force browsers to behave consistently when non-matching value is set
159
- if ( !optionSet ) {
160
- elem.selectedIndex = -1;
161
- }
162
- return values;
163
- }
164
- }
165
- }
166
- } );
167
-
168
- // Radios and checkboxes getter/setter
169
- jQuery.each( [ "radio", "checkbox" ], function() {
170
- jQuery.valHooks[ this ] = {
171
- set: function( elem, value ) {
172
- if ( jQuery.isArray( value ) ) {
173
- return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
174
- }
175
- }
176
- };
177
- if ( !support.checkOn ) {
178
- jQuery.valHooks[ this ].get = function( elem ) {
179
- return elem.getAttribute( "value" ) === null ? "on" : elem.value;
180
- };
181
- }
182
- } );
183
-
184
- } );
@@ -1,13 +0,0 @@
1
- define( [
2
- "./core",
3
- "./attributes/attr",
4
- "./attributes/prop",
5
- "./attributes/classes",
6
- "./attributes/val"
7
- ], function( jQuery ) {
8
-
9
- "use strict";
10
-
11
- // Return jQuery for attributes-only inclusion
12
- return jQuery;
13
- } );