@@ -142,8 +142,17 @@ $.extend( $.expr[ ":" ], {
142
142
}
143
143
} ) ;
144
144
145
- // support: jQuery <1.8
146
- if ( ! $ ( "<a>" ) . outerWidth ( 1 ) . jquery ) {
145
+ // support: jQuery 1.7 only
146
+ // Not a great way to check versions, but since we only support 1.7+ and only
147
+ // need to detect <1.8, this is a simple check that should suffice. Checking
148
+ // for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0
149
+ // and we'll never reach 1.70.0 (if we do, we certainly won't be supporting
150
+ // 1.7 anymore). See #11197 for why we're not using feature detection.
151
+ if ( $ . fn . jquery . substring ( 0 , 3 ) === "1.7" ) {
152
+
153
+ // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight()
154
+ // Unlike jQuery Core 1.8+, these only support numeric values to set the
155
+ // dimensions in pixels
147
156
$ . each ( [ "Width" , "Height" ] , function ( i , name ) {
148
157
var side = name === "Width" ? [ "Left" , "Right" ] : [ "Top" , "Bottom" ] ,
149
158
type = name . toLowerCase ( ) ,
@@ -187,10 +196,7 @@ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
187
196
} ) ;
188
197
} ;
189
198
} ) ;
190
- }
191
199
192
- // support: jQuery <1.8
193
- if ( ! $ . fn . addBack ) {
194
200
$ . fn . addBack = function ( selector ) {
195
201
return this . add ( selector == null ?
196
202
this . prevObject : this . prevObject . filter ( selector )
0 commit comments