PageSourceSearch

https://i-shift.com/wp-content/themes/OriginalTheme/asset/js/hover.js

js i-shift.com collected 2026-10-09 22:40:35 UTC 1,482 bytes, 54 lines download raw bytes

1
2(function($) {
3  var tapClass = "";
4  var hoverClass = "";
5
6	var Hover = window.Hover = function (ele) {
7		return new Hover.fn.init(ele);
8	};
9	Hover.fn = {
10		//Hover Instance
11		 init : function (ele) {
12			this.prop = ele;
13		}
14
15		, bind : function (_hoverClass, _tapClass) {
16			hoverClass = _hoverClass;
17			tapClass = _tapClass;
18
19			$(window).bind("touchstart", function(event) {
20				var target = event.target || window.target;
21
22				var bindElement = null;
23				if (target.tagName == "A" || $(target).hasClass(tapClass)) {
24					bindElement = $(target);
25				} else if ($(target).parents("a").length > 0) {
26					bindElement = $(target).parents("a");
27				} else if ($(target).parents("." + tapClass).length > 0) {
28					bindElement = $(target).parents("." + tapClass);
29				}
30
31				if (bindElement != null) {
32					Hover().touchstartHoverElement(bindElement);
33				}
34			});
35		}
36		, touchstartHoverElement : function (bindElement) {
37			bindElement.addClass(hoverClass);
38			bindElement.unbind("touchmove", Hover().touchmoveHoverElement);
39			bindElement.bind("touchmove", Hover().touchmoveHoverElement);
40
41			bindElement.unbind("touchend", Hover().touchendHoverElement);
42			bindElement.bind("touchend", Hover().touchendHoverElement);
43		}
44		, touchmoveHoverElement : function (event) {
45			$(this).removeClass(hoverClass);
46		}
47		, touchendHoverElement : function (event) {
48			$(this).removeClass(hoverClass);
49		}
50	}
51	Hover.fn.init.prototype = Hover.fn;
52
53	Hover().bind("hover", "tap");
54})(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.