Bug Tracker

Ticket #2915: patch.txt

File patch.txt, 909 bytes (added by lrbabe, 15 years ago)

patch to replace the test with isNaN()

Line 
1Index: /home/lrbabe/workspace/jQuery/ui/effects.core.js
2===================================================================
3--- /home/lrbabe/workspace/jQuery/ui/effects.core.js    (revision 5654)
4+++ /home/lrbabe/workspace/jQuery/ui/effects.core.js    (working copy)
5@@ -44,8 +44,8 @@
6         wrapper.css({position: 'relative'});
7         el.css({position: 'relative'});
8       } else {
9-        var top = parseInt(el.css('top'), 10); if (top.constructor != Number) top = 'auto';
10-        var left = parseInt(el.css('left'), 10); if (left.constructor != Number) left = 'auto';
11+        var top = parseInt(el.css('top'), 10); if (isNaN(top)) top = 'auto';
12+        var left = parseInt(el.css('left'), 10); if (isNaN(left)) left = 'auto';
13         wrapper.css({ position: el.css('position'), top: top, left: left, zIndex: el.css('z-index') }).show();
14         el.css({position: 'relative', top:0, left:0});
15       }