mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
parent
26fc3b5587
commit
6064a5e048
@ -1,8 +1,9 @@
|
||||
define( [
|
||||
"jquery",
|
||||
"ui/core",
|
||||
"ui/data",
|
||||
"ui/focusable"
|
||||
"ui/escape-selector",
|
||||
"ui/focusable",
|
||||
"ui/tabbable"
|
||||
], function( $ ) {
|
||||
|
||||
module( "core - selectors" );
|
||||
|
@ -31,6 +31,7 @@
|
||||
"./plugin",
|
||||
"./safe-active-element",
|
||||
"./safe-blur",
|
||||
"./tabbable",
|
||||
"./version"
|
||||
], factory );
|
||||
} else {
|
||||
@ -78,12 +79,4 @@ $.fn.extend( {
|
||||
}
|
||||
} );
|
||||
|
||||
$.extend( $.expr[ ":" ], {
|
||||
tabbable: function( element ) {
|
||||
var tabIndex = $.attr( element, "tabindex" ),
|
||||
hasTabindex = tabIndex != null;
|
||||
return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
|
||||
}
|
||||
} );
|
||||
|
||||
} ) );
|
||||
|
@ -32,7 +32,8 @@
|
||||
"./position",
|
||||
"./resizable",
|
||||
"./safe-active-element",
|
||||
"./safe-blur"
|
||||
"./safe-blur",
|
||||
"./tabbable"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
|
35
ui/tabbable.js
Normal file
35
ui/tabbable.js
Normal file
@ -0,0 +1,35 @@
|
||||
/*!
|
||||
* jQuery UI Tabbable @VERSION
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*/
|
||||
|
||||
//>>label: focusable
|
||||
//>>group: Core
|
||||
//>>description: Selects elements which can be tabbed to.
|
||||
//>>docs: http://api.jqueryui.com/tabbable-selector/
|
||||
|
||||
( function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [ "jquery", "./version", "./focusable" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
} ( function( $ ) {
|
||||
|
||||
return $.extend( $.expr[ ":" ], {
|
||||
tabbable: function( element ) {
|
||||
var tabIndex = $.attr( element, "tabindex" ),
|
||||
hasTabindex = tabIndex != null;
|
||||
return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
|
||||
}
|
||||
} );
|
||||
|
||||
} ) );
|
Loading…
Reference in New Issue
Block a user