PageSourceSearch

https://www.riveraction.org/modules/mega_menu/megamenu/js/mobile.js?sv4uzt

js riveraction.org collected 2026-10-01 12:22:52 UTC 4,832 bytes, 66 lines download raw bytes

1/*
2* jQuery Mobile Framework : events
3* Copyright (c) jQuery Project
4* Dual licensed under the MIT or GPL Version 2 licenses.
5* http://jquery.org/license
6*/
7(function(a,b,c){function i(b,c,d){var e=d.type;d.type=c;a.event.handle.call(b,d);d.type=e}a.each(("touchstart touchmove touchend orientationchange throttledresize "+"tap taphold swipe swipeleft swiperight scrollstart scrollstop").split(" "),function(b,c){a.fn[c]=function(a){return a?this.bind(c,a):this.trigger(c)};a.attrFn[c]=true});var d=a.support.touch,e="touchmove scroll",f=d?"touchstart":"mousedown",g=d?"touchend":"mouseup",h=d?"touchmove":"mousemove";a.event.special.scrollstart={enabled:true,setup:function(){function g(a,c){d=c;i(b,d?"scrollstart":"scrollstop",a)}var b=this,c=a(b),d,f;c.bind(e,function(b){if(!a.event.special.scrollstart.enabled){return}if(!d){g(b,true)}clearTimeout(f);f=setTimeout(function(){g(b,false)},50)})}};a.event.special.tap={setup:function(){var b=this,c=a(b);c.bind("vmousedown",function(d){function k(a){j();if(e==a.target){i(b,"tap",a)}}function j(){h();c.unbind("vclick",k).unbind("vmouseup",h).unbind("vmousecancel",j)}function h(){clearTimeout(g)}if(d.which&&d.which!==1){return false}var e=d.target,f=d.originalEvent,g;c.bind("vmousecancel",j).bind("vmouseup",h).bind("vclick",k);g=setTimeout(function(){i(b,"taphold",a.Event("taphold"))},750)})}};a.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var b=this,d=a(b);d.bind(f,function(b){function j(b){if(!f){return}var c=b.originalEvent.touches?b.originalEvent.touches[0]:b;i={time:(new Date).getTime(),coords:[c.pageX,c.pageY]};if(Math.abs(f.coords[0]-i.coords[0])>a.event.special.swipe.scrollSupressionThreshold){b.preventDefault()}}var e=b.originalEvent.touches?b.originalEvent.touches[0]:b,f={time:(new Date).getTime(),coords:[e.pageX,e.pageY],origin:a(b.target)},i;d.bind(h,j).one(g,function(b){d.unbind(h,j);if(f&&i){if(i.time-f.time<a.event.special.swipe.durationThreshold&&Math.abs(f.coords[0]-i.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(f.coords[1]-i.coords[1])<a.event.special.swipe.verticalDistanceThreshold){f.origin.trigger("swipe").trigger(f.coords[0]>i.coords[0]?"swipeleft":"swiperight")}}f=i=c})})}};(function(a,b){function g(){var a=e();if(a!==f){f=a;c.trigger("orientationchange")}}var c=a(b),d,e,f;a.event.special.orientationchange=d={setup:function(){if(a.support.orientation){return false}f=e();c.bind("throttledresize",g)},teardown:function(){if(a.support.orientation){return false}c.unbind("throttledresize",g)},add:function(a){var b=a.handler;a.handler=function(a){a.orientation=e();return b.apply(this,arguments)}}};a.event.special.orientationchange.orientation=e=function(){var a=document.documentElement;return a&&a.clientWidth/a.clientHeight<1.1?"portrait":"landscape"}})(jQuery,b);(function(){a.event.special.throttledresize={setup:function(){a(this).bind("resize",c)},teardown:function(){a(this).unbind("resize",c)}};var b=250,c=function(){f=(new Date).getTime();g=f-d;if(g>=b){d=f;a(this).trigger("throttledresize")}else{if(e){clearTimeout(e)}e=setTimeout(c,b-g)}},d=0,e,f,g})();a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(b,c){a.event.special[b]={setup:function(){a(this).bind(c,a.noop)}}})})(jQuery,this)
8
9
10jQuery.fn.megaMenu = function()
11{
12	
13	var	menuItem = $('.menu li'),
14	    menuItemLink = $(menuItem).find('a');
15	    menuItemChildren = $(menuItem).children('div');
16
17	function openCloseMegamenu() {
18		
19		$(menuItemLink).bind({
20			
21			touchstart: function(e) {
22				
23				var $this = $(this);
24				
25				$this.parent('li').toggleClass('isvisible');
26				
27				if( $this.parent('li').hasClass('isvisible') ) {
28					if( $this.parent('li').hasClass('right') ) {
29						$this.parent('li').removeClass('noactive').children('div').css("left", "auto");
30					}
31					else {
32						if( $this.next('div').hasClass('dropdown_fullwidth') ) {
33							$this.parent('li').removeClass('noactive').children('div').css("left", "20px");
34						}
35						else {
36							$this.parent('li').removeClass('noactive').children('div').css("left", "0px");
37						}
38					}
39					$this.parent('li').siblings().addClass('noactive').removeClass('isvisible').children('div').css("left", "-999em");
40				}
41				
42				else {
43					$this.parent('li').addClass('noactive').children('div').css("left", "-999em");
44				}
45			}
46			
47		});
48
49		$('.menu').bind('touchstart', function(e) {
50			e.stopPropagation();
51		});
52		$(document).bind('touchstart', function(){
53			$(menuItemChildren).css("left", "-999em");
54			$(menuItem).addClass('noactive').removeClass('isvisible');
55		});
56
57				
58	}  
59
60	openCloseMegamenu();
61	
62}
63
64$(function() {
65	$(".menu").megaMenu();
66});

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.