Skip to main content

Bug Tracker

Side navigation

Ticket #2915: patch.txt
File patch.txt, 0.9 KB (added by lrbabe, May 21, 2008 04:13PM UTC)

patch to replace the test with isNaN()

Index: /home/lrbabe/workspace/jQuery/ui/effects.core.js
===================================================================
--- /home/lrbabe/workspace/jQuery/ui/effects.core.js	(revision 5654)
+++ /home/lrbabe/workspace/jQuery/ui/effects.core.js	(working copy)
@@ -44,8 +44,8 @@
         wrapper.css({position: 'relative'});
         el.css({position: 'relative'});
       } else {
-        var top = parseInt(el.css('top'), 10); if (top.constructor != Number) top = 'auto';
-        var left = parseInt(el.css('left'), 10); if (left.constructor != Number) left = 'auto';
+        var top = parseInt(el.css('top'), 10); if (isNaN(top)) top = 'auto';
+        var left = parseInt(el.css('left'), 10); if (isNaN(left)) left = 'auto';
         wrapper.css({ position: el.css('position'), top: top, left: left, zIndex: el.css('z-index') }).show();
         el.css({position: 'relative', top:0, left:0});
       }

Download in other formats:

Original Format