/[projects]/misc/horsensspejder-web/jquery/jquery-ui-1.10.3/tests/unit/button/button_events.js
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/jquery-ui-1.10.3/tests/unit/button/button_events.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Wed Mar 12 19:30:05 2014 UTC (10 years, 3 months ago) by torben
File MIME type: application/javascript
File size: 843 byte(s)
initial import
1 /*
2 * button_events.js
3 */
4 (function($) {
5
6 module("button: events");
7
8 test("buttonset works with single-quote named elements (#7505)", function() {
9 expect( 1 );
10 $("#radio3").buttonset();
11 $("#radio33").click( function(){
12 ok( true, "button clicks work with single-quote named elements" );
13 }).click();
14 });
15
16 asyncTest( "when button loses focus, ensure active state is removed (#8559)", function() {
17 expect( 1 );
18
19 var element = $( "#button" ).button();
20
21 element.one( "keypress", function() {
22 element.one( "blur", function() {
23 ok( !element.is(".ui-state-active"), "button loses active state appropriately" );
24 start();
25 }).blur();
26 });
27
28 element.focus();
29 setTimeout(function() {
30 element
31 .simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } )
32 .simulate( "keypress", { keyCode: $.ui.keyCode.ENTER } );
33 });
34 });
35
36 })(jQuery);

  ViewVC Help
Powered by ViewVC 1.1.20