@@ -1266,150 +1266,150 @@ jQuery.each({
1266
1266
function num ( elem , prop ) {
1267
1267
return elem [ 0 ] && parseInt ( jQuery . curCSS ( elem [ 0 ] , prop , true ) , 10 ) || 0 ;
1268
1268
}
1269
- var expando = "jQuery" + now ( ) , uuid = 0 , windowData = { } ;
1270
-
1271
- jQuery . extend ( {
1272
- cache : { } ,
1273
-
1274
- data : function ( elem , name , data ) {
1275
- elem = elem == window ?
1276
- windowData :
1277
- elem ;
1278
-
1279
- var id = elem [ expando ] ;
1280
-
1281
- // Compute a unique ID for the element
1282
- if ( ! id )
1283
- id = elem [ expando ] = ++ uuid ;
1284
-
1285
- // Only generate the data cache if we're
1286
- // trying to access or manipulate it
1287
- if ( name && ! jQuery . cache [ id ] )
1288
- jQuery . cache [ id ] = { } ;
1289
-
1290
- // Prevent overriding the named cache with undefined values
1291
- if ( data !== undefined )
1292
- jQuery . cache [ id ] [ name ] = data ;
1293
-
1294
- // Return the named cache data, or the ID for the element
1295
- return name ?
1296
- jQuery . cache [ id ] [ name ] :
1297
- id ;
1298
- } ,
1299
-
1300
- removeData : function ( elem , name ) {
1301
- elem = elem == window ?
1302
- windowData :
1303
- elem ;
1304
-
1305
- var id = elem [ expando ] ;
1306
-
1307
- // If we want to remove a specific section of the element's data
1308
- if ( name ) {
1309
- if ( jQuery . cache [ id ] ) {
1310
- // Remove the section of cache data
1311
- delete jQuery . cache [ id ] [ name ] ;
1312
-
1313
- // If we've removed all the data, remove the element's cache
1314
- name = "" ;
1315
-
1316
- for ( name in jQuery . cache [ id ] )
1317
- break ;
1318
-
1319
- if ( ! name )
1320
- jQuery . removeData ( elem ) ;
1321
- }
1322
-
1323
- // Otherwise, we want to remove all of the element's data
1324
- } else {
1325
- // Clean up the element expando
1326
- try {
1327
- delete elem [ expando ] ;
1328
- } catch ( e ) {
1329
- // IE has trouble directly removing the expando
1330
- // but it's ok with using removeAttribute
1331
- if ( elem . removeAttribute )
1332
- elem . removeAttribute ( expando ) ;
1333
- }
1334
-
1335
- // Completely remove the data cache
1336
- delete jQuery . cache [ id ] ;
1337
- }
1338
- } ,
1339
- queue : function ( elem , type , data ) {
1340
- if ( elem ) {
1341
-
1342
- type = ( type || "fx" ) + "queue" ;
1343
-
1344
- var q = jQuery . data ( elem , type ) ;
1345
-
1346
- if ( ! q || jQuery . isArray ( data ) )
1347
- q = jQuery . data ( elem , type , jQuery . makeArray ( data ) ) ;
1348
- else if ( data )
1349
- q . push ( data ) ;
1350
-
1351
- }
1352
- return q ;
1353
- } ,
1354
-
1355
- dequeue : function ( elem , type ) {
1356
- var queue = jQuery . queue ( elem , type ) ,
1357
- fn = queue . shift ( ) ;
1358
-
1359
- if ( ! type || type === "fx" )
1360
- fn = queue [ 0 ] ;
1361
-
1362
- if ( fn !== undefined )
1363
- fn . call ( elem ) ;
1364
- }
1365
- } ) ;
1366
-
1367
- jQuery . fn . extend ( {
1368
- data : function ( key , value ) {
1369
- var parts = key . split ( "." ) ;
1370
- parts [ 1 ] = parts [ 1 ] ? "." + parts [ 1 ] : "" ;
1371
-
1372
- if ( value === undefined ) {
1373
- var data = this . triggerHandler ( "getData" + parts [ 1 ] + "!" , [ parts [ 0 ] ] ) ;
1374
-
1375
- if ( data === undefined && this . length )
1376
- data = jQuery . data ( this [ 0 ] , key ) ;
1377
-
1378
- return data === undefined && parts [ 1 ] ?
1379
- this . data ( parts [ 0 ] ) :
1380
- data ;
1381
- } else
1382
- return this . trigger ( "setData" + parts [ 1 ] + "!" , [ parts [ 0 ] , value ] ) . each ( function ( ) {
1383
- jQuery . data ( this , key , value ) ;
1384
- } ) ;
1385
- } ,
1386
-
1387
- removeData : function ( key ) {
1388
- return this . each ( function ( ) {
1389
- jQuery . removeData ( this , key ) ;
1390
- } ) ;
1391
- } ,
1392
- queue : function ( type , data ) {
1393
- if ( typeof type !== "string" ) {
1394
- data = type ;
1395
- type = "fx" ;
1396
- }
1397
-
1398
- if ( data === undefined )
1399
- return jQuery . queue ( this [ 0 ] , type ) ;
1400
-
1401
- return this . each ( function ( ) {
1402
- var queue = jQuery . queue ( this , type , data ) ;
1403
-
1404
- if ( type == "fx" && queue . length == 1 )
1405
- queue [ 0 ] . call ( this ) ;
1406
- } ) ;
1407
- } ,
1408
- dequeue : function ( type ) {
1409
- return this . each ( function ( ) {
1410
- jQuery . dequeue ( this , type ) ;
1411
- } ) ;
1412
- }
1269
+ var expando = "jQuery" + now ( ) , uuid = 0 , windowData = { } ;
1270
+
1271
+ jQuery . extend ( {
1272
+ cache : { } ,
1273
+
1274
+ data : function ( elem , name , data ) {
1275
+ elem = elem == window ?
1276
+ windowData :
1277
+ elem ;
1278
+
1279
+ var id = elem [ expando ] ;
1280
+
1281
+ // Compute a unique ID for the element
1282
+ if ( ! id )
1283
+ id = elem [ expando ] = ++ uuid ;
1284
+
1285
+ // Only generate the data cache if we're
1286
+ // trying to access or manipulate it
1287
+ if ( name && ! jQuery . cache [ id ] )
1288
+ jQuery . cache [ id ] = { } ;
1289
+
1290
+ // Prevent overriding the named cache with undefined values
1291
+ if ( data !== undefined )
1292
+ jQuery . cache [ id ] [ name ] = data ;
1293
+
1294
+ // Return the named cache data, or the ID for the element
1295
+ return name ?
1296
+ jQuery . cache [ id ] [ name ] :
1297
+ id ;
1298
+ } ,
1299
+
1300
+ removeData : function ( elem , name ) {
1301
+ elem = elem == window ?
1302
+ windowData :
1303
+ elem ;
1304
+
1305
+ var id = elem [ expando ] ;
1306
+
1307
+ // If we want to remove a specific section of the element's data
1308
+ if ( name ) {
1309
+ if ( jQuery . cache [ id ] ) {
1310
+ // Remove the section of cache data
1311
+ delete jQuery . cache [ id ] [ name ] ;
1312
+
1313
+ // If we've removed all the data, remove the element's cache
1314
+ name = "" ;
1315
+
1316
+ for ( name in jQuery . cache [ id ] )
1317
+ break ;
1318
+
1319
+ if ( ! name )
1320
+ jQuery . removeData ( elem ) ;
1321
+ }
1322
+
1323
+ // Otherwise, we want to remove all of the element's data
1324
+ } else {
1325
+ // Clean up the element expando
1326
+ try {
1327
+ delete elem [ expando ] ;
1328
+ } catch ( e ) {
1329
+ // IE has trouble directly removing the expando
1330
+ // but it's ok with using removeAttribute
1331
+ if ( elem . removeAttribute )
1332
+ elem . removeAttribute ( expando ) ;
1333
+ }
1334
+
1335
+ // Completely remove the data cache
1336
+ delete jQuery . cache [ id ] ;
1337
+ }
1338
+ } ,
1339
+ queue : function ( elem , type , data ) {
1340
+ if ( elem ) {
1341
+
1342
+ type = ( type || "fx" ) + "queue" ;
1343
+
1344
+ var q = jQuery . data ( elem , type ) ;
1345
+
1346
+ if ( ! q || jQuery . isArray ( data ) )
1347
+ q = jQuery . data ( elem , type , jQuery . makeArray ( data ) ) ;
1348
+ else if ( data )
1349
+ q . push ( data ) ;
1350
+
1351
+ }
1352
+ return q ;
1353
+ } ,
1354
+
1355
+ dequeue : function ( elem , type ) {
1356
+ var queue = jQuery . queue ( elem , type ) ,
1357
+ fn = queue . shift ( ) ;
1358
+
1359
+ if ( ! type || type === "fx" )
1360
+ fn = queue [ 0 ] ;
1361
+
1362
+ if ( fn !== undefined )
1363
+ fn . call ( elem ) ;
1364
+ }
1365
+ } ) ;
1366
+
1367
+ jQuery . fn . extend ( {
1368
+ data : function ( key , value ) {
1369
+ var parts = key . split ( "." ) ;
1370
+ parts [ 1 ] = parts [ 1 ] ? "." + parts [ 1 ] : "" ;
1371
+
1372
+ if ( value === undefined ) {
1373
+ var data = this . triggerHandler ( "getData" + parts [ 1 ] + "!" , [ parts [ 0 ] ] ) ;
1374
+
1375
+ if ( data === undefined && this . length )
1376
+ data = jQuery . data ( this [ 0 ] , key ) ;
1377
+
1378
+ return data === undefined && parts [ 1 ] ?
1379
+ this . data ( parts [ 0 ] ) :
1380
+ data ;
1381
+ } else
1382
+ return this . trigger ( "setData" + parts [ 1 ] + "!" , [ parts [ 0 ] , value ] ) . each ( function ( ) {
1383
+ jQuery . data ( this , key , value ) ;
1384
+ } ) ;
1385
+ } ,
1386
+
1387
+ removeData : function ( key ) {
1388
+ return this . each ( function ( ) {
1389
+ jQuery . removeData ( this , key ) ;
1390
+ } ) ;
1391
+ } ,
1392
+ queue : function ( type , data ) {
1393
+ if ( typeof type !== "string" ) {
1394
+ data = type ;
1395
+ type = "fx" ;
1396
+ }
1397
+
1398
+ if ( data === undefined )
1399
+ return jQuery . queue ( this [ 0 ] , type ) ;
1400
+
1401
+ return this . each ( function ( ) {
1402
+ var queue = jQuery . queue ( this , type , data ) ;
1403
+
1404
+ if ( type == "fx" && queue . length == 1 )
1405
+ queue [ 0 ] . call ( this ) ;
1406
+ } ) ;
1407
+ } ,
1408
+ dequeue : function ( type ) {
1409
+ return this . each ( function ( ) {
1410
+ jQuery . dequeue ( this , type ) ;
1411
+ } ) ;
1412
+ }
1413
1413
} ) ; /*!
1414
1414
* Sizzle CSS Selector Engine - v0.9.3
1415
1415
* Copyright 2009, The Dojo Foundation
0 commit comments