PageSourceSearch

https://www.thankstoveterans.com/assets/ttv/js/jquery_tabbable.js

js thankstoveterans.com collected 2026-10-04 20:00:49 UTC 1,701 bytes, 63 lines download raw bytes

vendor: 1,701 bytes, lines 1-63
1//jQuery Tabbable
2(function($){
3	'use strict';
4	
5	/**
6	 * :focusable and :tabbable, both taken from jQuery UI Core
7	 */
8	$.extend($.expr[ ':' ], {
9		data: $.expr.createPseudo ?
10			$.expr.createPseudo(function(dataName){
11				return function(elem){
12					return !!$.data(elem, dataName);
13				};
14			}) :
15			// support: jQuery <1.8
16			function(elem, i, match){
17				return !!$.data(elem, match[ 3 ]);
18			},
19
20		focusable: function(element){
21			return focusable(element, !isNaN($.attr(element, 'tabindex')));
22		},
23
24		tabbable: function(element){
25			var tabIndex = $.attr(element, 'tabindex'),
26				isTabIndexNaN = isNaN(tabIndex);
27			return ( isTabIndexNaN || tabIndex >= 0 ) && focusable(element, !isTabIndexNaN);
28		}
29	});
30
31	/**
32	 * focussable function, taken from jQuery UI Core
33	 * @param element
34	 * @returns {*}
35	 */
36	function focusable(element){
37		var map, mapName, img,
38			nodeName = element.nodeName.toLowerCase(),
39			isTabIndexNotNaN = !isNaN($.attr(element, 'tabindex'));
40		if('area' === nodeName){
41			map = element.parentNode;
42			mapName = map.name;
43			if(!element.href || !mapName || map.nodeName.toLowerCase() !== 'map'){
44				return false;
45			}
46			img = $('img[usemap=#' + mapName + ']')[0];
47			return !!img && visible(img);
48		}
49		return ( /^(input|select|textarea|button|object)$/.test(nodeName) ?
50			!element.disabled :
51			'a' === nodeName ?
52				element.href || isTabIndexNotNaN :
53				isTabIndexNotNaN) &&
54			// the element and all of its ancestors must be visible
55			visible(element);
56
57		function visible(element){
58			return $.expr.filters.visible(element) && !$(element).parents().addBack().filter(function(){
59				return $.css(this, 'visibility') === 'hidden';
60			}).length;
61		}
62	}
63})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.