]> source.dussan.org Git - jquery-ui.git/commitdiff
slider: implemented option "noKeyboard" to disable keyboard controls.
authorPaul Bakaus <paul.bakaus@googlemail.com>
Sat, 31 May 2008 14:34:44 +0000 (14:34 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Sat, 31 May 2008 14:34:44 +0000 (14:34 +0000)
ui/source/ui.slider.js

index 5d2d60cdefa67986838ada741679c005ff4ccf74..e18fb47563dcd88b27a8b2582a66f2df62c44805 100644 (file)
                                .parent()\r
                                        .bind('focus', function(e) { self.focus(this.firstChild); })\r
                                        .bind('blur', function(e) { self.blur(this.firstChild); })\r
-                                       .bind('keydown', function(e) { self.keydown(e.keyCode, this.firstChild); })\r
+                                       .bind('keydown', function(e) { if(!self.options.noKeyboard) self.keydown(e.keyCode, this.firstChild); })\r
                        ;\r
                        \r
                        // Bind the click to the slider itself\r
                                x: Math.round(this.convertValue(x, "x")) || 0,\r
                                y: Math.round(this.convertValue(y, "y")) || 0\r
                        };\r
-                       \r
+               \r
                        if (!noPropagation) {\r
                                this.propagate('start', null);\r
                                this.propagate('stop', null);\r