git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Applied the RegExp issues reported by Jeff Robinson here: http://jmrware.com/articles...
[jquery.git]
/
src
/
effects.js
diff --git
a/src/effects.js
b/src/effects.js
index
9c8abe5
..
87d0f4d
100644
(file)
--- a/
src/effects.js
+++ b/
src/effects.js
@@
-1,9
+1,8
@@
(function( jQuery ) {
var elemdisplay = {},
(function( jQuery ) {
var elemdisplay = {},
- rfxtypes = /toggle|show|hide/,
+ rfxtypes = /^(?:toggle|show|hide)$/,
rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
- rdashAlpha = /-([a-z])/ig,
timerId,
fxAttrs = [
// height animations
timerId,
fxAttrs = [
// height animations
@@
-12,11
+11,7
@@
var elemdisplay = {},
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
- ],
-
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- };
+ ];
jQuery.fn.extend({
show: function( speed, callback ) {
jQuery.fn.extend({
show: function( speed, callback ) {
@@
-36,7
+31,7
@@
jQuery.fn.extend({
display = elemdisplay[ nodeName ];
} else {
display = elemdisplay[ nodeName ];
} else {
- var elem = jQuery("<" + nodeName + " />").appendTo("body");
+ var elem = jQuery("<" + nodeName + ">").appendTo("body");
display = elem.css("display");
display = elem.css("display");
@@
-125,7
+120,7
@@
jQuery.fn.extend({
self = this;
for ( p in prop ) {
self = this;
for ( p in prop ) {
- var name = p.replace(rdashAlpha, fcamelCase);
+ var name = jQuery.camelCase( p );
if ( p !== name ) {
prop[ name ] = prop[ p ];
if ( p !== name ) {
prop[ name ] = prop[ p ];
@@
-321,7
+316,7
@@
jQuery.fx.prototype = {
return this.elem[ this.prop ];
}
return this.elem[ this.prop ];
}
- var r = parseFloat( jQuery.css( this.elem, this.prop ), 10 );
+ var r = parseFloat( jQuery.css( this.elem, this.prop ) );
return r && r > -10000 ? r : 0;
},
return r && r > -10000 ? r : 0;
},