Revision: 9602
Updated Code
at November 13, 2008 15:15 by 1man
Updated Code
//Store a color $(this).data('color', $(this).css('color')); //Retrieve the color later $(this).css('color', $(this).data('color')); //Remove the data $(this).removeData('color');
Revision: 9601
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 13, 2008 10:45 by 1man
Initial Code
//Store a color $(this).data('color', $(this).css('color')); //Retrieve the color later $(this).css('color', $(this).data('color'));
Initial URL
Initial Description
I didn't realise until now you could do this in jQuery, very useful. Store a value for later use, then remove it.
Initial Title
The jQuery Data Store
Initial Tags
data, jquery
Initial Language
JavaScript