Home | History | Annotate | Download | only in jquery

Lines Matching defs:Data

333 	// Convert dashed to camelCase; used by the css and data modules
588 // Instance-specific data
860 * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
1707 // non-xml :nth-child(...) stores cache data on `parent`
2110 // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
3091 fire = function( data ) {
3092 memory = options.memory && data;
3099 if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
3521 * Determines whether an object can have data
3535 function Data() {
3545 this.expando = jQuery.expando + Data.uid++;
3548 Data.uid = 1;
3549 Data.accepts = jQuery.acceptData;
3551 Data.prototype = {
3553 // We can accept data for non-element nodes in modern browsers,
3556 if ( !Data.accepts( owner ) ) {
3566 unlock = Data.uid++;
3588 set: function( owner, data, value ) {
3597 if ( typeof data === "string" ) {
3598 cache[ data ] = value;
3604 jQuery.extend( this.cache[ unlock ], data );
3607 for ( prop in data ) {
3608 cache[ prop ] = data[ prop ];
3618 // empty data object. A valid owner object must be provided.
3635 // 2. The data stored at the key
3655 // return the expected data based on which path was taken[*]
3670 // When data is initially created, via ("key", "val") signature,
3707 var data_priv = new Data();
3709 var data_user = new Data();
3718 // 3. Use the same single mechanism to support "private" and "user" data.
3719 // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
3726 function dataAttr( elem, key, data ) {
3730 // data from the HTML5 data-* attribute
3731 if ( data === undefined && elem.nodeType === 1 ) {
3732 name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
3733 data = elem.getAttribute( name );
3735 if ( typeof data === "string" ) {
3737 data = data === "true" ? true :
3738 data === "false" ? false :
3739 data === "null" ? null :
3741 +data + "" === data ? +data :
3742 rbrace.test( data ) ? jQuery.parseJSON( data ) :
3743 data;
3746 // Make sure we set the data so it isn't changed later
3747 data_user.set( elem, key, data );
3749 data = undefined;
3752 return data;
3760 data: function( elem, name, data ) {
3761 return data_user.access( elem, name, data );
3770 _data: function( elem, name, data ) {
3771 return data_priv.access( elem, name, data );
3780 data: function( key, value ) {
3781 var i, name, data,
3788 data = data_user.get( elem );
3798 if ( name.indexOf( "data-" ) === 0 ) {
3800 dataAttr( elem, name, data[ name ] );
3808 return data;
3819 var data,
3826 // throw an exception if an attempt to read a data cache is made.
3828 // Attempt to get data from the cache
3830 data = data_user.get( elem, key );
3831 if ( data !== undefined ) {
3832 return data;
3835 // Attempt to get data from the cache
3837 data = data_user.get( elem, camelKey );
3838 if ( data !== undefined ) {
3839 return data;
3842 // Attempt to "discover" the data in
3843 // HTML5 custom data-* attrs
3844 data = dataAttr( elem, camelKey, undefined );
3845 if ( data !== undefined ) {
3846 return data;
3849 // We tried really hard, but the data doesn't exist.
3853 // Set the data...
3856 // data that might've been store with a camelCased key.
3857 var data = data_user.get( this, camelKey );
3859 // For HTML5 data-* attribute interop, we have to
3867 if ( key.indexOf("-") !== -1 && data !== undefined ) {
3883 queue: function( elem, type, data ) {
3891 if ( data ) {
3892 if ( !queue || jQuery.isArray( data ) ) {
3893 queue = data_priv.access( elem, type, jQuery.makeArray(data) );
3895 queue.push( data );
3949 queue: function( type, data ) {
3953 data = type;
3962 return data === undefined ?
3965 var queue = jQuery.queue( this, type, data );
4088 add: function( elem, types, handler, data, selector ) {
4100 // Caller can pass in an object of custom data in lieu of the handler
4151 data: data,
4165 if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
4264 trigger: function( event, data, elem, onlyHandlers ) {
4309 // Clone any incoming data and prepend the event, creating the handler arg list
4310 data = data == null ?
4312 jQuery.makeArray( data, [ event ] );
4316 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
4350 handle.apply( cur, data );
4356 event.result = handle.apply( cur, data );
4367 if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
4432 event.data = handleObj.data;
4811 on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
4816 // ( types-Object, selector, data )
4818 // ( types-Object, data )
4819 data = data || selector;
4823 this.on( type, selector, data, types[ type ], one );
4828 if ( data == null && fn == null ) {
4831 data = selector = undefined;
4835 fn = data;
4836 data = undefined;
4838 // ( types, data, fn )
4839 fn = data;
4840 data = selector;
4861 jQuery.event.add( this, types, fn, data, selector );
4864 one: function( types, selector, data, fn ) {
4865 return this.on( types, selector, data, fn, 1 );
4899 trigger: function( type, data ) {
4901 jQuery.event.trigger( type, data, this );
4904 triggerHandler: function( type, data ) {
4907 return jQuery.event.trigger( type, data, elem, true );
4991 // 1. Copy private data: events, handlers, etc.
5009 // 2. Copy user data
5172 var data, elem, type, key,
5180 if ( key && (data = data_priv.cache[ key ]) ) {
5181 if ( data.events ) {
5182 for ( type in data.events ) {
5188 jQuery.removeEvent( elem, type, data.handle );
5193 // Discard any remaining `private` data
5198 // Discard any remaining `user` data
5495 // We don't have any data stored on the element,
6751 data = data_priv.get( this );
6754 if ( data[ index ] && data[ index ].stop ) {
6755 stopQueue( data[ index ] );
6758 for ( index in data ) {
6759 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
6760 stopQueue( data[ index ] );
6787 data = data_priv.get( this ),
6788 queue = data[ type + "queue" ],
6789 hooks = data[ type + "queueHooks" ],
6793 // Enable finishing flag on private data
6794 data.finish = true;
6819 delete data.finish;
7484 jQuery.fn[ name ] = function( data, fn ) {
7486 this.on( name, null, data, fn ) :
7496 bind: function( types, data, fn ) {
7497 return this.on( types, null, data, fn );
7503 delegate: function( selector, types, data, fn ) {
7504 return this.on( types, selector, data, fn );
7521 jQuery.parseJSON = function( data ) {
7522 return JSON.parse( data + "" );
7527 jQuery.parseXML = function( data ) {
7529 if ( !data || typeof data !== "string" ) {
7536 xml = tmp.parseFromString( data, "text/xml" );
7542 jQuery.error( "Invalid XML: " + data );
7562 * - AFTER param serialization (s.data is a string if s.processData is true)
7809 return { state: "success", data: response };
7831 data: null,
7861 // Data converters
8048 // Convert data if not already a string
8049 if ( s.data && s.processData && typeof s.data !== "string" ) {
8050 s.data = jQuery.param( s.data, s.traditional );
8083 // If data is available, append data to url
8084 if ( s.data ) {
8085 cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
8086 // #9682: remove data so that it's not used in an eventual retry
8087 delete s.data;
8112 // Set the correct header, if data is being sent
8113 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
8209 // Get response data
8240 // If we have data, let's convert it
8243 success = response.data;
8258 // Set data for the fake xhr object
8293 getJSON: function( url, data, callback ) {
8294 return jQuery.get( url, data, callback, "json" );
8303 jQuery[ method ] = function( url, data, callback, type ) {
8304 // Shift arguments if data argument was omitted
8305 if ( jQuery.isFunction( data ) ) {
8307 callback = data;
8308 data = undefined;
8315 data: data,
8609 // Accessing binary-data responseText throws an exception
8630 xhr.send( options.hasContent && options.data || null );
8731 typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
8734 // Handle iff the expected data type is "jsonp" or we have a parameter to set
8742 // Insert callback into url or form data
8749 // Use data converter to retrieve json after script execution
8796 // data: string of html
8799 jQuery.parseHTML = function( data, context, keepScripts ) {
8800 if ( !data || typeof data !== "string" ) {
8809 var parsed = rsingleTag.exec( data ),
8817 parsed = jQuery.buildFragment( [ data ], context, scripts );
8867 data: params