}
// Make sure that we're working with the right name
- var ret, origName = name.replace( rdashAlpha, fcamelCase ),
+ var ret, origName = jQuery.camelCase( name ),
style = elem.style, hooks = jQuery.cssHooks[ origName ];
name = jQuery.cssProps[ origName ] || origName;
css: function( elem, name, extra ) {
// Make sure that we're working with the right name
- var ret, origName = name.replace( rdashAlpha, fcamelCase ),
+ var ret, origName = jQuery.camelCase( name ),
hooks = jQuery.cssHooks[ origName ];
name = jQuery.cssProps[ origName ] || origName;
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
+ },
+
+ camelCase: function( string ) {
+ return string.replace( rdashAlpha, fcamelCase );
}
});
var elemdisplay = {},
rfxtypes = /toggle|show|hide/,
rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
- rdashAlpha = /-([a-z])/ig,
timerId,
fxAttrs = [
// height animations
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
- ],
-
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- };
+ ];
jQuery.fn.extend({
show: function( speed, callback ) {
self = this;
for ( p in prop ) {
- var name = p.replace(rdashAlpha, fcamelCase);
+ var name = jQuery.camelCase( p );
if ( p !== name ) {
prop[ name ] = prop[ p ];