]> source.dussan.org Git - jquery.git/commitdiff
Make jQuery work without warnings in strict mode, in Firefox.
authorJohn Resig <jeresig@gmail.com>
Mon, 20 Aug 2007 03:59:34 +0000 (03:59 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 20 Aug 2007 03:59:34 +0000 (03:59 +0000)
src/event/event.js
src/fx/fx.js

index bb5f9d273dc345f3e2ac9451e15829178ab1bec1..59fff51da8f25313c42839afb746a1cf0260cc48 100644 (file)
@@ -196,14 +196,14 @@ jQuery.event = {
                event.preventDefault = function() {
                        // if preventDefault exists run it on the original event
                        if (originalEvent.preventDefault)
-                               return originalEvent.preventDefault();
+                               originalEvent.preventDefault();
                        // otherwise set the returnValue property of the original event to false (IE)
                        originalEvent.returnValue = false;
                };
                event.stopPropagation = function() {
                        // if stopPropagation exists run it on the original event
                        if (originalEvent.stopPropagation)
-                               return originalEvent.stopPropagation();
+                               originalEvent.stopPropagation();
                        // otherwise set the cancelBubble property of the original event to true (IE)
                        originalEvent.cancelBubble = true;
                };
index 3ad3dd5141fd7ea61ec15f1bed4fcaf78da2ed22..9f767a9f404bfc4872be2bff62f3518083fee8b8 100644 (file)
@@ -340,6 +340,9 @@ jQuery.fn.extend({
                                else
                                        e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
                        });
+
+                       // For JS strict compliance
+                       return true;
                });
        },