PageSourceSearch

https://hizb-ut-tahrir.info/ar/templates/gk_news/js/gk.menu.js

js hizb-ut-tahrir.info collected 2026-10-02 05:30:34 UTC 4,518 bytes, 147 lines download raw bytes

1jQuery(document).ready(function() {
2
3
4	if(jQuery('#gkExtraMenu')) {
5	        // fix for the iOS devices     
6	        jQuery('#gkExtraMenu ul li span').each(function(el) {
7	            el.attr('onmouseover', '');
8	        });
9	
10	        jQuery('#gkExtraMenu ul li a').each(function(el) {
11	            el = jQuery(el);
12	            el.attr('onmouseover', '');
13	
14	            if(el.parent().hasClass('haschild') && jQuery(document.body).attr('data-tablet') != null) {
15	                el.click(function(e) {
16	                    if(el.attr("dblclick") == undefined) {
17	                        e.preventDefault();
18	                        e.stopPropagation();
19	                        el.attr("dblclick", new Date().getTime());
20	                    } else {
21	                        var now = new Date().getTime();
22	                        if(now - attr("dblclick", 0) < 500) {
23	                            window.location = el.attr('href');
24	                        } else {
25	                           e.preventDefault();
26	                           e.stopPropagation();
27	                           el.attr("dblclick", new Date().getTime());
28	                        }
29	                    }
30	                });
31	            }
32	        });
33	
34	        var base = jQuery('#gkExtraMenu');
35
36	        if($GKMenu && ($GKMenu.height || $GKMenu.width)) {    
37	      	  	 
38	            base.find('li.haschild').each(function(i, el){   
39	            	el = jQuery(el);  
40	               
41	                if(el.children('.childcontent').length > 0) {
42	                    var content = el.children('.childcontent').first();
43	                    var prevh = content.height();
44	                    var prevw = content.width();
45						var duration = $GKMenu.duration;
46						var heightAnim = $GKMenu.height;
47						var widthAnim = $GKMenu.width;
48						
49
50	                    var fxStart = { 
51							'height' : heightAnim ? 0 : prevh, 
52							'width' : widthAnim ? 0 : prevw, 
53							'opacity' : 0 
54						};
55						var fxEnd = { 
56							'height' : prevh, 
57							'width' : prevw, 
58							'opacity' : 1 
59						};	
60						
61						
62	                    content.css(fxStart);
63	                    content.css({'left' : 'auto', 'overflow' : 'hidden' });
64												
65	                    el.click(function(){
66                    			                    
67                            var content = el.children('.childcontent').first();
68                            content.css('display', 'block');
69							
70							if(content.attr('data-base-margin') != null) {
71								content.css({
72									'margin-left': content.attr('data-base-margin') + "px"
73								});
74							}
75								
76							var pos = content.offset();
77							var winWidth = jQuery(window).outerWidth();
78							var winScroll = jQuery(window).scrollLeft();
79								
80							if(pos.left + prevw > (winWidth + winScroll)) {
81								var diff = (winWidth + winScroll) - (pos.left + prevw) - 5;
82								var base = parseInt(content.css('margin-left'));
83								var margin = base + diff;
84								
85								if(base > 0) {
86									margin = -prevw + 10;	
87								}
88								content.css('margin-left', margin + "px");
89								
90								if(content.attr('data-base-margin') == null) {
91									content.attr('data-base-margin', base);
92								}
93							}
94							//
95							content.animate(
96								fxEnd, 
97								duration, 
98								function() { 
99									if(content.outerHeight() == 0){ 
100										content.css('overflow', 'hidden'); 
101									} else if(
102										content.outerHeight() - prevh < 30 && 
103										content.outerHeight() - prevh >= 0
104									) {
105										content.css('overflow', 'visible');
106									}
107								}
108							);
109						});
110					el.mouseleave(function(){
111					
112							content.css({
113								'overflow': 'hidden'
114							});
115							//
116							content.animate(
117								fxStart, 
118								duration, 
119								function() { 
120									if(content.outerHeight() == 0){ 
121										content.css('overflow', 'hidden'); 
122									} else if(
123										content.outerHeight() - prevh < 30 && 
124										content.outerHeight() - prevh >= 0
125									) {
126										content.css('overflow', 'visible');
127									}
128									
129									content.css('display', 'none');
130								}
131							);
132						});
133					}
134				});
135	            
136	            base.find('li.haschild').each(function(i, el) {
137	            						el = jQuery(el);
138	            						content = jQuery(el.children('.childcontent').first());
139	            						content.css({ 'display': 'none' });
140	            					});
141	            
142	        }
143	    }
144	
145
146
147});

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.