Skip to content
Permalink
Browse files

Core: Changed parameter names for selectors.

  • Loading branch information
scottgonzalez committed Jan 1, 2009
1 parent b132631 commit d9a5b09b0018e09a653884926662f80e42206010
Showing with 8 additions and 8 deletions.
  1. +8 −8 ui/ui.core.js
@@ -209,34 +209,34 @@ $.fn.extend({
//Additional selectors
$.extend($.expr[':'], {

data: function(a, i, m) {
return !!$.data(a, m[3]);
data: function(elem, i, match) {
return !!$.data(elem, match[3]);
},

// TODO: add support for object, area
tabbable: function(a, i, m) {
tabbable: function(elem) {

var nodeName = a.nodeName.toLowerCase();
var nodeName = elem.nodeName.toLowerCase();
function isVisible(element) {
return !($(element).is(':hidden') || $(element).parents(':hidden').length);
}

return (
// in tab order
a.tabIndex >= 0 &&
elem.tabIndex >= 0 &&

( // filter node types that participate in the tab order

// anchor tag
('a' == nodeName && a.href) ||
('a' == nodeName && elem.href) ||

// enabled form element
(/input|select|textarea|button/.test(nodeName) &&
'hidden' != a.type && !a.disabled)
'hidden' != elem.type && !elem.disabled)
) &&

// visible on page
isVisible(a)
isVisible(elem)
);

}

0 comments on commit d9a5b09

Please sign in to comment.
You can’t perform that action at this time.