PageSourceSearch

https://garoweonline.com/assets/js/custom.js

js garoweonline.com collected 2026-10-02 02:54:45 UTC 6,977 bytes, 296 lines download raw bytes

1(function($) {
2	'use strict';
3	// Mean Menu JS
4	jQuery('.mean-menu').meanmenu({ 
5		meanScreenWidth: "991"
6	}); 
7	$(".meanmenu-reveal").on('click',  function() {
8		$('.mean-nav ul').toggleClass('openMenu');
9		$('body').toggleClass('overflow-hidden');
10	});
11	 
12 // Sidebar Modal JS
13 $(".header-donate-btn").on('click',  function() {
14	$('.sidebar-modal').toggleClass('active');
15});
16$(".sidebar-modal-close-btn").on('click',  function() {
17	$('.sidebar-modal').removeClass('active');
18});
19 
20	// Header Sticky JS
21	$(window).on('scroll', function() {
22		if ($(this).scrollTop() >150){  
23			$('.navbar-area').addClass("is-sticky");
24		}
25		else{
26			$('.navbar-area').removeClass("is-sticky");
27		}
28	});
29
30	// Go to Top JS
31	// Scroll Event
32	$(window).on('scroll', function(){
33		var scrolled = $(window).scrollTop();
34		if (scrolled > 300) $('.go-top').addClass('active');
35		if (scrolled < 300) $('.go-top').removeClass('active');
36	});  
37
38	// Click Event JS
39	$('.go-top').on('click', function() {
40		$("html, body").animate({ scrollTop: "0" },  500);
41	});
42
43
44	// Animation JS
45	new WOW().init();
46 
47	// Detail Slider
48	$('.detail-slider').owlCarousel({ 
49		loop:true,
50		margin: 0,
51		nav:true,
52		mouseDrag: true,
53		items:1,
54		dots: false,
55		autoHeight: true,
56		autoplay: true,
57		smartSpeed:1500,
58		autoplayHoverPause: true,
59		center: false,
60		navText: [
61			"<i class='ti ti-angle-left'></i>",
62			"<i class='ti ti-angle-right'></i>",
63		],
64	});
65
66	 
67})(jQuery);
68 
69/**********News Ticker**********/
70(function(jQuery){
71
72	$.fn.breakingNews = function(params){
73			var defaults={
74					width			:'100%',
75					modul			:'breakingnews',
76					color			:'default',
77					border			:false,
78					effect			:'fade',
79					fontstyle		:'normal',
80					autoplay		:false,
81					timer			:4000,
82					feed			:false,
83					feedlabels		:false,
84					feedcount		:5
85				};
86			var feeds=[];
87			var labels=[];
88			var params=$.extend(defaults,params);
89			
90			return this.each(function(){
91				//Variables------------------------------------
92				params.modul=$("#"+$(this).attr("id"));
93				var timername=params.modul;
94				var active=0;
95				var previous=0;
96				var count=params.modul.find("ul li").length;
97				var changestate=true;
98				
99				if (params.feed!=false)
100				{
101					getRSS();
102				}
103				else
104				{
105					params.modul.find("ul li").eq(active).fadeIn();
106				}
107				resizeEvent();
108				
109				if (params.autoplay)
110				{
111					timername=setInterval(function(){autoPlay()},params.timer);					
112					$(params.modul).on("mouseenter",function (){
113						clearInterval(timername);
114					});
115					
116					$(params.modul).on("mouseleave",function (){
117						timername=setInterval(function(){autoPlay()},params.timer);
118					});
119				}
120				else
121				{
122					clearInterval(timername);
123				}
124				
125				if (!params.border)
126				{
127					params.modul.addClass("bn-bordernone");
128				}
129
130				if (params.fontstyle=="italic")
131					params.modul.addClass("bn-italic");
132					
133				if (params.fontstyle=="bold")
134					params.modul.addClass("bn-bold");
135					
136				if (params.fontstyle=="bold-italic")
137					params.modul.addClass("bn-bold bn-italic");
138					
139				params.modul.addClass("bn-"+params.color);
140				
141				//Events---------------------------------------
142				$(window).on("resize",function (){
143					resizeEvent();
144				});
145				
146				params.modul.find(".bn-navi span").on("click",function(){
147					if (changestate)
148					{
149						changestate=false;
150						if ($(this).index()==0)
151						{
152							active--;
153							if (active<0)
154								active=count-1;
155								
156							changeNews();
157						}
158						else
159						{
160							active++;
161							if (active==count)
162								active=0;
163							
164							changeNews();
165						}
166					}
167				});
168				
169				//functions------------------------------------
170				function resizeEvent()
171				{
172					if (params.modul.width()<480)
173					{
174						params.modul.find(".bn-title h2").css({"display":"none"});
175						params.modul.find(".bn-title").css({"width":10});
176						params.modul.find("ul").css({"left":30});
177					}
178					else
179					{
180						params.modul.find(".bn-title h2").css({"display":"inline-block"});
181						params.modul.find(".bn-title").css({"width":"auto"});
182						params.modul.find("ul").css({"left":$(params.modul).find(".bn-title").width()+30});
183					}
184				}
185				
186				function autoPlay()
187				{
188					active++;
189					if (active==count)
190						active=0;
191					
192					changeNews();
193				}
194				
195				function changeNews()
196				{
197					if (params.effect=="fade")
198					{
199						params.modul.find("ul li").css({"display":"none"});
200						params.modul.find("ul li").eq(active).fadeIn("normal",function (){ 
201							changestate=true;
202						});
203					}
204					else if (params.effect=="slide-h")
205					{
206						params.modul.find("ul li").eq(previous).animate({width:0},function(){
207							$(this).css({"display":"none","width":"100%"});
208							params.modul.find("ul li").eq(active).css({"width":0,"dis
208play":"block"});
209							params.modul.find("ul li").eq(active).animate({width:"100%"},function(){
210								changestate=true;
211								previous=active;
212							});
213						});
214					}
215					else if (params.effect=="slide-v")
216					{
217						if (previous<=active)
218						{
219							params.modul.find("ul li").eq(previous).animate({top:-60});
220							params.modul.find("ul li").eq(active).css({top:60,"display":"block"});
221							params.modul.find("ul li").eq(active).animate({top:0},function(){
222								previous=active;
223								changestate=true;
224							});
225						}
226						else
227						{
228							params.modul.find("ul li").eq(previous).animate({top:60});
229							params.modul.find("ul li").eq(active).css({top:-60,"display":"block"});
230							params.modul.find("ul li").eq(active).animate({top:0},function(){
231								previous=active;
232								changestate=true;
233							});
234						}
235					}
236				}
237				
238				
239				function getRSSx(a,b,c)
240				{
241					c=new XMLHttpRequest;
242					c.open('GET',a);
243					c.onload=b;
244					c.send()
245				}
246				
247				function yql(a,b)
248				{
249					return 'http://query.yahooapis.com/v1/public/yql?q='+encodeURIComponent('select * from '+b+' where url=\"'+a+'\" limit '+params.feedcount)+'&format=json';
250				};
251				
252				function getRSS()
253				{
254					feeds=params.feed.split(",");
255					labels=params.feedlabels.split(",");
256					count=0;
257					params.modul.find("ul").html("");
258					xx=0;
259					for (k=0; k<feeds.length; k++)
260					{
261						getRSSx(yql(feeds[k].trim(),'rss'),function()
262						{ 
263							var resultx=JSON.parse(this.response); 
264							resultx=resultx.query.results.item;			
265							$(resultx).each(function(index, element) {
266								count++;
267								dataLink= $('<a>').prop('href', resultx[index].link).prop('hostname');
268								params.modul.find("ul").append('<li><a target="_blank" href="'+resultx[index].link+'"><span>'+dataLink+'</span> - '+resultx[index].title+'</a></li>');
269								if (xx==0)
270									params.modul.find("ul li").eq(0).fadeIn();
271								xx++;
272								
273							});
274							
275						})
276					}
277					
278				}
279
280			});
281			
282				
283		};
284
285
286		$("#top-news").breakingNews({
287			effect		:"slide-v",
288			autoplay	:true,
289			timer		:3000,
290			color		:"turquoise",
291			border		:true
292		}); 
293		
294})(jQuery);
295
296

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.