PageSourceSearch

https://www.oweg.in/admin/view/template/extension/module/so_page_builder/assets/js/shortcodes.js

js oweg.in collected 2026-09-25 13:13:32 UTC 6,597 bytes, 214 lines download raw bytes

1/*
2 * ------------------------------------------------------------------------
3 * Copyright (C) 2009 - 2013 The YouTech JSC. All Rights Reserved.
4 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
5 * Author: The YouTech JSC
6 * Websites: http://www.smartaddons.com - http://www.cmsportal.net
7 * ------------------------------------------------------------------------
8*/
9// Correctly calculate dimensions of hidden elements 
10document.addEventListener("touchstart", function() {},false);
11/* Accordion Block */
12jQuery(document).ready(function($) {
13	$("ul.yt-accordion li").each(function() {
14		if($(this).index() > 0) {
15			$(".yt-accordion-inner").hide();
16			$(".enable+.yt-accordion-inner").show();
17			$(".enable+.yt-accordion-inner").addClass("active");
18		}
19		else {
20			$(".enable").addClass('active');
21		}
22		var ua = navigator.userAgent,
23		event = (ua.match(/iPad/i)) ? "touchstart" : "click";
24		$(this).children(".accordion-heading").bind(event, function() {
25			//alert("123");
26			if($(this).hasClass("active"))
27			{
28				$(this).removeClass("active");
29				$(this).siblings(".yt-accordion-inner").removeClass("active");
30				$(this).siblings(".yt-accordion-inner").slideUp(350);
31			}
32			else
33			{
34				$(this).addClass("active");
35				$(this).siblings(".yt-accordion-inner").addClass("active");
36				$(this).siblings(".yt-accordion-inner").slideDown(350);
37			}
38			
39			$(this).parent().siblings("li").children(".yt-accordion-inner").slideUp(350);
40			$(this).parent().siblings("li").find(".active").removeClass("active");
41		});
42	});
43	/* Tooltip Block */
44	//$('a.boxtip').tooltip({placement:'top'});
45	$("[data-placement='top']").tooltip({placement:'top'});
46	$("[data-placement='bottom']").tooltip({placement:'bottom'});
47	$("[data-placement='left']").tooltip({placement:'left'});
48	$("[data-placement='right']").tooltip({placement:'right'});
49	$("[data-placement]").hover(function(){
50		$(this).css({"display":"inline-block"});
51	});
52
53	/* Quick show */
54	var $modal= $( ".yt-modal" ).clone();
55	$(".yt-modal").remove();
56	$modal.appendTo( "body" );
57});
58
59/* Slider Carousel */
60jQuery(document).ready(function($) {
61	$(".yt-slider-carousel .item").each(function() {
62		if($(this).index() == 0) {
63			$(this).addClass('active');
64		}
65	});
66	if (typeof jQuery != 'undefined') {
67		(function($) {
68			$(document).ready(function(){
69				$('#yt-slider-carousel').each(function(index, element) {
70					$(this)[index].slide = null;
71				});
72				$('#yt-slider-carousel1').each(function(index, element) {
73					$(this)[index].slide = null;
74				});
75				$('#yt-slider-carousel2').each(function(index, element) {
76					$(this)[index].slide = null;
77				});
78				$('#yt-extra-carousel').each(function(index, element) {
79					$(this)[index].slide = null;
80				});
81				$('#yt-extra-carousel1').each(function(index, element) {
82					$(this)[index].slide = null;
83				});
84			});
85		})(jQuery);
86	}
87	$(".yt-extra-carousel .item,.carousel-indicators li").each(function() {
88		if($(this).index() == 0) {
89			$(this).addClass('active');
90		}
91	});
92});
93
94
95/* Message box */
96function closeMessage(el) {
97	$(el).parent().parent().parent().animate({opacity: 0}, 350, function() {
98		$(el).parent().parent().parent().hide();
99	});
100}
101
102/* Gallery Block */
103jQuery(document).ready(function($) {
104	$(".gallery-item img").hover(function(){
105		$(this).animate({ opacity: 0.55 }, 150);
106	}, function(){
107		$(this).animate({ opacity: 1 }, 150);
108	});
109	$(".tabnav li").click(function (){
110			var clas = $(this).attr('class');
111			if(clas.substr(0,7)=='showall')
112			{
113				$('.yt-gallery-tabbed').find('.tabnav .'+clas.substr(8)+'').removeClass('active');
114			}
115			else
116			{
117				$('.yt-gallery-tabbed').find('.tabnav .'+clas+'').removeClass('active');
118			}
119			$(this).addClass('active');
120			var al =$(this).attr('id');
121			$("."+clas+".masonry-brick ").css('display','none');
122			if(clas.substr(0,7)=='showall')
123			{
124				$("."+clas.substr(8,37)+".masonry-brick").css('display','block');
125			}
126			else
127			{
128				$('.'+al+'').css('display','block');
129			}
130		})
131});
132
133
134
135/* Tabs Block */
136jQuery(document).ready(function($) {
137	var tabs = $('ul.nav-tabs');
138	$(".tab-content .clearfix").each(function() {
139		if($(this).index() != 0) {
140			$(this).css({visibility: 'hidden',display:'block' })
141		}
142	});
143	tabs.each(function(i) {
144		var tab = $(this).find('> li > a');
145		var litab = $(this).find('li');
146		var ua = navigator.userAgent,
147		event = (ua.match(/iPad/i)) ? "touchstart" : "click";
148		tab.bind(event, function(e) {
149			var contentLocation = $(this).attr('href');
150			if(contentLocation.charAt(0)=="#") {
151				e.preventDefault();
152				tab.removeClass('active');
153				litab.removeClass('active');
154				$(this).addClass('active');
155				$(contentLocation).css({ visibility: 'visible'}).addClass('active').siblings().css({ visibility: 'hidden'}).removeClass('active');
156			}
157		});
158		litab.bind(event, function(e) {
159				litab.removeClass('active');
160				$(this).addClass('active');
161		});
162	});
163});
164
165
166/* Toggle Block */
167jQuery(document).ready(function($) {
168	$("ul.yt-toggle-box li").each(function() {
169		var ua = navigator.userAgent,
170		event = (ua.match(/iPad/i)) ? "touchstart" : "click";
171		$(this).children(".toggle-box-content").not(".active").css('display', 'none');
172		$(this).children(".toggle-box-head").bind(event, function(){
173			$(this).addClass(function(){
174				if($(this).hasClass("active")){
175					$(this).removeClass("active");
176					return "";
177				}
178				return "active";
179			});
180			$(this).siblings(".toggle-box-content").slideToggle();
181		});
182	});
183});
184
185
186/* Divider Block */
187jQuery(document).ready(function($) {
188	var ua = navigator.userAgent,
189	event = (ua.match(/iPad/i)) ? "touchstart" : "click";
190	$("a.scroll-top").bind(event, function() {
191		$("body,html").animate({
192			scrollTop: 0
193		}, 800);
194	});
195});
196
197/* Points of Interest */
198jQuery(document).ready(function($){
199	//open interest point description
200	$('.yt-single-point').children('a').on('click', function(event){
201		event.preventDefault();
202		var selectedPoint = $(this).parent('li');
203		if( selectedPoint.hasClass('is-open') ) {
204			selectedPoint.removeClass('is-open').addClass('visited');
205		} else {
206			selectedPoint.addClass('is-open').siblings('.yt-single-point.is-open').removeClass('is-open').addClass('visited');
207		}
208	});
209	//close interest point description
210	$('.yt-close-info').on('click', function(event){
211		event.preventDefault();
212		$(this).parents('.yt-single-point').eq(0).removeClass('is-open').addClass('visited');
213	});
214});

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.