]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog Modal Form Demo: Added ui-state-focus class on focus (fixes #4568 - Demo:...
authorScott González <scott.gonzalez@gmail.com>
Sun, 31 May 2009 12:19:20 +0000 (12:19 +0000)
committerScott González <scott.gonzalez@gmail.com>
Sun, 31 May 2009 12:19:20 +0000 (12:19 +0000)
demos/dialog/modal-form.html

index 508c738269c1af77f5542fcfe427312988afe812..da95b12782bdce32cdab44263a4ac366fe2429c5 100644 (file)
                        $('#dialog').dialog('open');
                })
                .hover(
-                       function()
-                               $(this).addClass("ui-state-hover"); 
+                       function() {
+                               $(this).addClass("ui-state-hover");
                        },
-                       function()
-                               $(this).removeClass("ui-state-hover"); 
+                       function() {
+                               $(this).removeClass("ui-state-hover");
                        }
-               ).mousedown(function(){
-                       $(this).addClass("ui-state-active"); 
+               )
+               .focus(function() {
+                       $(this).addClass('ui-state-focus');
                })
-               .mouseup(function(){
+               .blur(function() {
+                       $(this).removeClass('ui-state-focus');
+               })
+               .mousedown(function() {
+                       $(this).addClass("ui-state-active");
+               })
+               .mouseup(function() {
                                $(this).removeClass("ui-state-active");
                });