PageSourceSearch

https://gambianoc.gm/wp-content/plugins/designthemes-core-features/shortcodes/js/shortcodes.js

js gambianoc.gm collected 2026-10-03 18:44:55 UTC 19,501 bytes, 690 lines download raw bytes

1jQuery(document).ready(function($) {
2
3	"use strict";
4
5	/* animate number */
6	$('.dt-sc-counter').each(function(){
7
8	  var $posttext = $(this).find('.dt-sc-counter-number').attr('data-append');
9	  var $append = '';
10
11	  if (typeof $posttext === "undefined") {
12		  $append = $.animateNumber.numberStepFactories.append('');
13	  } else {
14		  $append = $.animateNumber.numberStepFactories.append($posttext);
15	  }
16
17	  $(this).one('inview', function (event, visible) {
18		  if(visible === true) {
19			  var val = $(this).find('.dt-sc-counter-number').attr('data-value');
20			  $(this).find('.dt-sc-counter-number').animateNumber({ number: val, numberStep: $append }, 2000);
21		  }
22	  });
23	});
24
25	/* accordion & toggle */
26	$('.dt-sc-toggle').toggleClick(function(){ $(this).addClass('active'); },function(){ $(this).removeClass('active'); });
27	$('.dt-sc-toggle').on('click', function(){ $(this).next('.dt-sc-toggle-content').slideToggle(); });
28
29	$('.dt-sc-toggle-frame-set').each(function(){
30		var $this = $(this),
31		    $toggle = $this.find('.dt-sc-toggle-accordion');
32
33			$toggle.on('click', function(){
34				if( $(this).next().is(':hidden') ) {
35					$this.find('.dt-sc-toggle-accordion').removeClass('active').next().slideUp();
36					$(this).toggleClass('active').next().slideDown();
37				}
38				return false;
39			});
40
41			// activate first item always
42			$this.find('.dt-sc-toggle-accordion:first').addClass("active");
43			$this.find('.dt-sc-toggle-accordion:first').next().slideDown();
44  	});
45
46	/* tooltip */
47	if($(".dt-sc-tooltip-bottom").length){
48	   $(".dt-sc-tooltip-bottom").each(function(){	$(this).tipTip({maxWidth: "auto"}); });
49	}
50
51	if($(".dt-sc-tooltip-top").length){
52	   $(".dt-sc-tooltip-top").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "top"}); });
53	}
54
55	if($(".dt-sc-tooltip-left").length){
56	   $(".dt-sc-tooltip-left").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "left"}); });
57	}
58
59	if($(".dt-sc-tooltip-right").length){
60	   $(".dt-sc-tooltip-right").each(function(){ $(this).tipTip({maxWidth: "auto",defaultPosition: "right"}); });
61	}
62
63	/* horizontal tabs */
64	if($('ul.dt-sc-tabs-horizontal').length > 0){
65		$('ul.dt-sc-tabs-horizontal').each(function(){
66
67			var $effect = $(this).parent('.dt-sc-tabs-horizontal-container').attr('data-effect');
68			$(this).fpTabs('> .dt-sc-tabs-horizontal-content', {
69				effect: $effect
70			});
71		});
72	}
73	if($('ul.dt-sc-tabs-horizontal-frame').length > 0){
74		$('ul.dt-sc-tabs-horizontal-frame').each(function(){
75
76			var $effect = $(this).parent('.dt-sc-tabs-horizontal-frame-container').attr('data-effect');
77			$(this).fpTabs('> .dt-sc-tabs-horizontal-frame-content', {
78				effect: $effect
79			});
80		});
81	}
82
83	/* vertical tabs */
84	if($('ul.dt-sc-tabs-vertical').length > 0){
85		$('ul.dt-sc-tabs-vertical').each(function(){
86
87			var $effect = $(this).parent('.dt-sc-tabs-vertical-container').attr('data-effect');
88			$(this).fpTabs('> .dt-sc-tabs-vertical-content', {
89				effect: $effect
90			});
91		});
92
93		$('.dt-sc-tabs-vertical').each(function(){
94			$(this).find("li:first").addClass('first').addClass('current');
95			$(this).find("li:last").addClass('last');
96		});
97
98		$('.dt-sc-tabs-vertical li').on('click', function(){
99			$(this).parent().children().removeClass('current');
100			$(this).addClass('current');
101		});
102	}
103	if($('ul.dt-sc-tabs-vertical-frame').length > 0){
104		$('ul.dt-sc-tabs-vertical-frame').each(function(){
105
106			var $effect = $(this).parent('.dt-sc-tabs-vertical-frame-container').attr('data-effect');
107			$(this).fpTabs('> .dt-sc-tabs-vertical-frame-content', {
108				effect: $effect
109			});
110		});
111
112		$('.dt-sc-tabs-vertical-frame').each(function(){
113			$(this).find("li:first").addClass('first').addClass('current');
114			$(this).find("li:last").addClass('last');
115		});
116
117		$('.dt-sc-tabs-vertical-frame li').on('click', function(){
118			$(this).parent().children().removeClass('current');
119			$(this).addClass('current');
120		});
121	}
122
123	/* ajax mailchimp */
124	$('form[name="frmsubscribe"]').each(function(){
125
126		$(this).on('submit', function(){
127			var $this = $(this);
128			var $mc_fname = $this.find("input[name='dt_mc_fname']").val(),
129				$mc_email = $this.find("input[name='dt_mc_emailid']").val(),
130				$mc_apikey = $this.find("input[name='dt_mc_apikey']").val(),
131				$mc_listid = $this.find("input[name='dt_mc_listid']").val();
132
133			$.ajax({
134				type: "post",
135				dataType : "html",
136				url: dttheme_urls.ajaxurl,
137				data:
138				{
139					action: 'dt_theme_mailchimp_subscribe',
140					mc_fname: $mc_fname,
141					mc_email: $mc_email,
142					mc_apikey: $mc_apikey,
143					mc_listid: $mc_listid
144				},
145				success: function (response) {
146					$this.parent().find('.dt_ajax_subscribe_msg').html(response);
147					$this.parent().find('.dt_ajax_subscribe_msg').slideDown('slow');
148					if (response.match('success') != null){
149						$this.find("input[name='mc_submit']").attr('disabled', 'disabled');
150						$this.find("input[name='mc_submit']").addClass('disabled');
151					}
152				}
153			});
154			return false;
155		});
156    });
157
158	$(window).on('load', function(){
159
160		/* testimonial carousel */
161		if($(".carousel_items").length) {
162			$(".carousel_items .dt-sc-testimonial-carousel").each(function(){
163
164			  var $prev = $(this).parents(".carousel_items").find(".testimonial-prev");
165			  var $next = $(this).parents(".carousel_items").find(".testimonial-next");
166			  var $anim = $(this).parents(".carousel_items").attr("data-animation");
167
168			  $(this).carouFredSel({
169				responsive: true,
170				auto: false,
171				width: '100%',
172				prev: $prev,
173				next: $next,
174				height: 'variable',
175				scroll: { easing: "linear", duration: 500, fx : $anim },
176				items: { width: 1170, height: 'variable',  visible: { min: 1, max: 1 } },
177				swipe: {
178					onMouse: true,
179					onTouch: true
180				}
181			  });
182			});
183		}
184
185		/* partners carousel */
186		if($(".dt-sc-partners-carousel").length) {
187			$(".dt-sc-partners-carousel").each(function(){
188
189				var $prev = $(this).parents(".dt-sc-partners-carousel-wrapper").find(".partners-prev");
190				var $next = $(this).parents(".dt-sc-partners-carousel-wrapper").find(".partners-next");
191				var $scroll = $(this).parents(".dt-sc-partners-carousel-wrapper").attr('data-scroll');
192				var $visible = $(this).parents(".dt-sc-partners-carousel-wrapper").attr('data-visible');
193
194				$(this).carouFredSel({
195					responsive: true,
196					auto: false,
197					width: '100%',
198					height: 'variable',
199					prev: $prev,
200					next: $next,
201					scroll: parseInt($scroll), // The number of items to scroll at once
202					items: {
203						visible:{
204							min: 1,
205							max: parseInt($visible) // The number of items to show at once
206						}
207					},
208					swipe: {
209						onMouse: true,
210						onTouch: true
211					}
212				});
213			});
214		}
215
216		/* images carousel */
217		if($(".dt-sc-images-carousel").length) {
218			$(".dt-sc-images-carousel").each(function(){
219
220				var $prev = $(this).parents(".dt-sc-images-wrapper").find(".images-prev");
221				var $next = $(this).parents(".dt-sc-images-wrapper").find(".images-next");
222
223				$(this).carouFredSel({
224					responsive: true,
225					auto: false,
226					width: '100%',
227					height: 'variable',
228					prev: $prev,
229					next: $next,
230					scroll: 1,
231					items: {
232						width:570,
233						height: 'variable',
234						visible: { min: 1, max: 1 }
235					},
236					swipe: {
237						onMouse: true,
238						onTouch: true
239					}
240				});
241			});
242		}
243
244		/* twitter carousel */
245		if($('.dt-sc-twitter-carousel-wrapper').length > 0) {
246			$('.dt-sc-twitter-carousel-wrapper .dt-sc-twitter-carousel').carouFredSel({
247				width: 'auto',
248				height: 'auto',
249				scroll: 1,
250				direction: 'up',
251				items: {
252					height: 'auto',
253					visible: { min: 1, max: 1 }
254				}
255			});
256		}
257
258		/* special testimonials */
259		if($('.dt-sc-testimonial-special-wrapper').length > 0) {
260			$('.dt-sc-testimonial-special-wrapper .dt-sc-testimonial-special').carouFredSel({
261				responsive: true,
262				auto: false,
263				width: '100%',
264				pagination: {
265					container: ".dt-sc-testimonial-images",
266					anchorBuilder: false
267				},
268				height: 'auto',
269				scroll: { fx: "crossfade" },
270				items: { visible: { min: 1, max: 1 } }
271			});
272		}
273
274		/* donutchart */
275		$(".dt-sc-donutchart").each(function(){
276			var $this = $(this);
277			var $bgColor =  ( $this.data("bgcolor") !== undefined ) ? $this.data("bgcolor") : "#5D18D6";
278			var $fgColor =  ( $this.data("fgcolor") !== undefined ) ? $this.data("fgcolor") : "#000000";
279			var $size = ( $this.data("size") !== undefined ) ? $this.data("size") : "100";
280			var $donutwidth = ( $this.data("donutwidth") !== undefined ) ? $this.data("donutwidth") : "5";
281
282			$this.donutchart({'size': $size, 'fgColor': $fgColor, 'bgColor': $bgColor , 'donutwidth' : $donutwidth });
283			$this.donutchart('animate');
284		});
285
286		//Morris Donut
287		jQuery(".dt-sc-donutmorris").each(function(){
288			var $this = jQuery(this);
289
290			var $data = [];
291			$this.find('span').each(function(){
292				var $label = jQuery(this).attr('data-label');
293			 var $value = jQuery(this).attr('data-value');
294
295			 var $t = [];
296			 $t['label'] = $label; $t['value'] = $value;
297
298			 $data.push($t);
299			});
300
301			var $color = [];
302			$color = jQuery(this).attr('data-color');
303
304			Morris.Donut({
305			 element: $this,
306			 colors: [$color],
307			 data: $data
308		 });
309
310		});//Morris Donut Chart Ends
311
312		//Carousel Items...
313		if($(".carousel_items").length) {
314			$(".carousel_items .dt_carousel").each(function(){
315
316			  var $min = parseInt($(this).attr('data-visible'));
317			  var $scroll = parseInt($(this).attr('data-scroll'));
318			  var $auto = false;
319			  if($(this).attr('data-auto') == 'true') {
320				  $auto = true;
321			  }
322			  var $animation = $(this).attr('data-animation');
323
324			  if($(window).width() <= 767) { $min = 1; }
325
326			  var prv = $(this).parent('.carousel_items').find('.prev-arrow'); var nxt = $(this).parent('.carousel_items').find('.next-arrow');
327			  var pager = $(this).parent('.carousel_items').find('.dt-carousel-pagination');
328
329			  $(this).carouFredSel({
330				responsive: true,
331				auto: $auto,
332				width: '100%',
333				prev: prv,
334				next: nxt,
335				pagination: pager,
336				height: 'variable',
337				scroll: { items: $scroll, fx: $animation },
338				items: { width: parseInt( 1170 / $min ),  height: 'variable', visible: { min: $min } },
339				onCreate: function () {
340					$(window).on("resize", function() {
341						$(this).trigger('configuration', ['debug', false, true]);
342					}).trigger('resize');
343				},
344				swipe: {
345					onMouse: true,
346					onTouch: true
347				}
348			  });
349			});
350		}
351
352		$('.dt-sc-special-testimonial').each( function() {
353
354			$(this).find('.testimonial-details-for').slick({
355				slidesToShow: 1,
356				slidesToScroll: 1,
357				arrows: false,
358				fade: true,
359				asNavFor: '.testimonial-details-nav'
360			});
361
362			var dots = $(this).find('.testimonial-details-nav').attr('data-dots');
363			if(dots == undefined) {
364				dots = false;
365			}
366			dots = Boolean(dots);
367
368			var itemstoshow = $(this).find('.testimonial-details-nav').attr('data-itemstoshow');
369			if(itemstoshow == undefined) {
370				itemstoshow = 5;
371			}
372
373			itemstoshow = parseInt(itemstoshow, 10);
374
375			$(this).find('.testimonial-details-nav').slick({
376				slidesToShow: itemstoshow,
377				slidesToScroll: 1,
378				asNavFor: '.testimonial-details-for',
379				dots: dots,
380				centerMode: true,
381				focusOnSelect: true,
382				responsive: [
383				  {
384					breakpoint: 992,
385					settings: {
386					  slidesToShow: 5,
387					  slidesToScroll: 5,
388					  dots: dots,
389					}
390				  },
391				  {
392					breakpoint: 768,
393					settings: {
394					  slidesToShow: 3,
395					  slidesToScroll: 3
396					}
397				  },
398				  {
399					breakpoint: 480,
400					settings: {
401					  slidesToShow: 1,
402					  slidesToScroll: 1
403					}
404				  }
405				]
406			});
407		});
408
409
410		$('.dt-sc-hr-timeline-slider').each( function() {
411
412			$(this).find('.timeline-details-for').slick({
413				slidesToShow: 1,
414				slidesToScroll: 1,
415				arrows: false,
416				asNavFor: '.timeline-details-nav'
417			});
418
419			var dots = $(this).find('.timeline-details-nav').attr('data-dots');
420			if(dots == undefined) {
421				dots = false;
422			}
423			dots = Boolean(dots);
424
425			var itemstoshow = $(this).find('.timeline-details-nav').attr('data-itemstoshow');
426			if(itemstoshow == undefined) {
427				itemstoshow = 5;
428			}
429
430			itemstoshow = parseInt(itemstoshow, 10);
431
432			$(this).find('.timeline-details-nav').slick({
433				slidesToShow: itemstoshow,
434				slidesToScroll: 1,
435				asNavFor: '.timeline-details-for',
436				dots: dots,
437				centerMode: true,
438				focusOnSelect: true,
439				responsive: [
440				  {
441					breakpoint: 992,
442					settings: {
443					  slidesToShow: 5,
444					  slidesToScroll: 5,
445					  dots: dots,
446					}
447				  },
448				  {
449					breakpoint: 768,
450					settings: {
451					  slidesToShow: 3,
452					  slidesToScroll: 3
453					}
454				  },
455				  {
456					breakpoint: 480,
457					settings: {
458					  slidesToShow: 1,
459					  slidesToScroll: 1
460					}
461				  }
462				]
463			});
464		});
465	});
466
467	/* parallax section */
468	if($(".dt-sc-parallax-section").length) {
469		$('.dt-sc-parallax-section').each(function(){
470			$(this).on('inview', function (event, visible) {
471				if(visible === true) {
472					$(this).parallax("50%", 0.5);
473				} else {
474					$(this).css('background-position', '');
475				}
476			});
477		});
478	}
479
480	/* video manager */
481	if($(".dt-sc-video-wrapper").length) {
482
483		if($(".dt-sc-video-item").length) {
484
485			$(".dt-sc-video-item").each(function(){
486				$(this).on('click', function(){
487					$('.video-overlay-inner a').attr('href', $(this).attr('data-link'));
488					$('.dt-sc-video-wrapper img').attr('src', $(this).find('.dt-sc-vitem-thumb img').attr('data-full'));
489					$('.video-overlay-inner h2').html($(this).find('h2').html());
490					$('.video-overlay-inner p').html($(this).find('p').html());
491					$(this).parent('div').children().removeClass('active');
492					$(this).addClass('active');
493				});
494			});
495		}
496
497		$(".video-overlay-inner a").prettyPhoto({animation_speed:'normal',theme:'light_square',slideshow:3000, autoplay_slideshow: false,social_tools: false,deeplinking:false});
498		var video_scroll = $(".dt-sc-video-manager-right").niceScroll({ cursorcolor:"#ffffff", cursorwidth: "2px"});
499		video_scroll.rail.addClass('dt-sc-skin');
500	}
501
502	/* Load More Button */
503	$('.dt-sc-infinite-gallery-load-more').each(function(){
504
505		var $this = $(this),
506			$x = $(this).prev('.dt-sc-infinite-gallery-container').data('paged'),
507			$xstyle = $(this).data('style');
508
509		if(  $xstyle == 'lazy' ) {
510			$(window).scroll(function(){
511				if($(window).scrollTop() == $(document).height() - $(window).height()){
512
513					var $per_page = $this.data('per-page'),
514						$term = $this.data('term'),
515						$style = $this.data('style'),
516						$paged = $x,
517						$prev = $this.prev();
518
519					$x++;
520
521					$.ajax({
522						type : "post",
523						dataType : "html",
524						url : dttheme_urls.ajaxurl,
525						data : { action: "dt_ajax_infinite_galleries", per_page : $per_page, term : $term, style: $style , paged: $paged },
526						success: function (data) {
527							if (data.length > 0) {
528								$prev.append( data );
529							} else {
530								$prev.find(".message").removeClass("hidden");
531								//$this.addClass('hidden');
532
533								setTimeout(function(){
534									$prev.find(".message").addClass('hidden');
535									$this.addClass('disable');
536								}, 5000);
537							}
538						},
539						error: function (jqXHR, textStatus, errorThrown) {
540						}
541					});
542				}
543			});
544		} else if( $xstyle == 'load-more') {
545
546			$this.on('click', function(e){
547
548				e.preventDefault();
549
550				var $per_page = $(this).data('per-page'),
551					$term = $(this).data('term'),
552					$style = $(this).data('style'),
553					$paged = $x,
554					$prev = $(this).prev();
555
556				$x++;
557
558				$.ajax({
559					type : "post",
560					dataType : "html",
561					url : dttheme_urls.ajaxurl,
562					data : { action: "dt_ajax_infinite_galleries", per_page : $per_page, term : $term, style: $style , paged: $paged },
563					success: function (data) {
564
565						if (data.length > 0) {
566							$prev.append( data );
567						} else {
568							$prev.find(".message").removeClass("hidden");
569							//$this.addClass('hidden');
570
571							setTimeout(function(){
572								$prev.find(".message").addClass('hidden');
573								$this.addClass('disable');
574							}, 5000);
575						}
576					},
577					error: function (jqXHR, textStatus, errorThrown) {
578					}
579				});
580			});
581		}
582	});
583});
584
585jQuery(document).ready(function($){
586
587    "use strict";
588    "use strict";
589    // Mailchimp Subscribe Form
590    $('form[name="dt-subscribe"]').each(function(){
591        $(this).on('submit', function(){
592
593            var $this = $(this),
594                $mc_email = $this.find("input[name='dt_mc_emailid']").val(),
595                $mc_apikey = $this.find("input[name='dt_mc_apikey']").val(),
596                $mc_listid = $this.find("input[name='dt_mc_listid']").val();
597
598            $.ajax({
599                type: "post",
600                dataType : "html",
601                url: dttheme_urls.ajaxurl,
602                data: {
603                    action: 'dt_mailchimp_subscribe',
604                    email: $mc_email,
605                    apikey: $mc_apikey,
606                    listid: $mc_listid
607                },
608                success: function (response) {
609                    $this.parent().find("div.dt-subscribe-msg").html( response );
610                    $this.parent().find("div.dt-subscribe-msg").slideDown( 'slow' );
611                    if (response.match('success') != null){
612						$this.find("input[name='mc_submit']").attr('disabled', 'disabled');
613						$this.find("input[name='mc_submit']").addClass('disabled');
614					}
615                }
616            });
617
618            return false;
619        });
620    });
621
622    // Slide Down Search
623    $('div.slide-down-header-search').each(function(){
624        var triggerBttn = $(this).find("a.dt-search-icon"),
625            overlay = $(this).find("div.top-menu-search-container");
626
627        triggerBttn.on('click', function(){
628            overlay.toggleClass('show-top-menu-search');
629        });
630    });
631
632    // Overlay Search
633    $("div.overlay-header-search").each(function(){
634        var triggerBttn = $(this).find("a.dt-search-icon"),
635            overlay = $(this).find('div.overlay'),
636            closeBttn = $(this).find('div.overlay-close');
637
638       triggerBttn.on('click', function(){
639            if( overlay.hasClass( 'open' ) ) {
640                overlay.removeClass( 'open' )
641                overlay.addClass( 'close' );
642            }else if( !overlay.hasClass( 'close' ) ) {
643                overlay.addClass( 'open' );
644            }
645        });
646        closeBttn.on('click', function(){
647            if( overlay.hasClass( 'open' ) ) {
648                overlay.removeClass( 'open' )
649                overlay.addClass( 'close' );
650
651                overlay.removeClass( 'close' );
652            }else if( !overlay.hasClass( 'close' ) ) {
653                overlay.addClass( 'open' );
654            }
655        });
656    });
657
658    /* Type writing text */
659   	if( $(".type-writer").length ) {
660   		$(".type-writer").each(function(index, element){
661   			$(this).one('inview', function (event, visible){
662   				var _this = $(this);
663   				if(visible === true) {
664
665   					var txt = _this.data('text'),
666   						tot = txt.length,
667   						ch  = 0;
668
669   					(function typeIt(){
670   						if(ch > tot) return;
671   						_this.text( txt.substring(0, ch++) );
672   						setTimeout(typeIt, ~~(Math.random()*(300-60+1)+60));
673   					}());
674   				}
675   			});
676   		});
677   	}
678});
679
680/* progress bar */
681(function($){
682	$(".dt-sc-progress").one('inview', function (event, visible) {
683		var $this = $(this),
684		pvalue = $this.find('.dt-sc-bar').attr('data-value');
685
686		if (visible == true) {
687			$this.find('.dt-sc-bar').animate({width: pvalue + "%"},600,function(){ $this.find('.dt-sc-bar-text').fadeIn(400); });
688		}
689	});
690})(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.