PageSourceSearch

https://www.smartphoto.ch/blog/wp-content/plugins/g7-shortcodes/js/shortcodes.js?ver=7.0.4

js smartphoto.ch collected 2026-09-26 06:48:57 UTC 2,506 bytes, 112 lines download raw bytes

1(function ($) {
2	/**
3	 * tabs plugin
4	 */
5	if (!$.fn.g7_tabs) {
6		$.fn.g7_tabs = function() {
7			return this.each(function() {
8				//Get all tabs
9				var tab = $(this).find('> li > a');
10				var active_tab = $(this).find('> li:first > a');
11				tab.click(function(e) {
12					//Get Location of tab's content
13					var contentLocation = $(this).attr('href');
14					//Let go if not a hashed one
15					if (contentLocation.charAt(0)=="#") {
16						e.preventDefault();
17						//Make Tab Active
18						tab.removeClass('active');
19						$(this).addClass('active');
20						//Show Tab Content & add active class
21						$(contentLocation)
22							.show()
23							.addClass('active')
24							.siblings()
25								.hide()
26								.removeClass('active');
27					}
28				});
29				active_tab.click();
30			});
31		};
32	}
33
34    /**
35     * accordion plugin
36     */
37	if (!$.fn.g7_accordion) {
38		$.fn.g7_accordion = function() {
39			return this.each(function() {
40				var dd_width = $(this).width() - 20;
41				var all_dt = $(this).find('> dt');
42				var all_dd = $(this).find('> dd');
43				var found = $(this).find('> dt.active');
44				if (found.length == 0) {
45					var active_dt = $(this).find('> dt:first');
46				} else {
47					var active_dt = found;
48				}
49				all_dd.width(dd_width); //fix animation jump
50				all_dt.click(function() {
51					var target_dd = $(this).next();
52					if (!target_dd.hasClass('active')) {
53						target_dd
54							.slideDown()
55							.addClass('active')
56							.siblings('dd')
57								.slideUp()
58								.removeClass('active');
59						$(this)
60							.addClass('active')
61							.siblings('dt')
62								.removeClass('active');
63					}
64				});
65				active_dt.click();
66			});
67		};
68	}
69
70    /**
71     * toggle plugin
72     */
73	if (!$.fn.g7_toggle) {
74		$.fn.g7_toggle = function() {
75			return this.each(function() {
76				var dd_width = $(this).width() - 10;
77				var dt = $(this).find('> dt');
78				var dd = $(this).find('> dd');
79				dd.width(dd_width).hide();
80				dt.click(function() {
81					var dt_active = dt.hasClass('active');
82					if (dt_active) {
83						dd.slideUp();
84						dt.removeClass('active');
85					} else {
86						dd.slideDown();
87						dt.addClass('active');
88					}
89				});
90			});
91		};
92	}
93
94	$(function() {
95		/**
96		 * activate accordion, toggle and tabs
97		 */
98		$('.g7-accordion').g7_accordion();
99		$('.g7-toggle').g7_toggle();
100		$('.g7-tabs').g7_tabs();
101
102		/**
103		 * close action for message boxes
104		 */
105		$('.g7-msg').click(function() {
106			var msgbox = $(this);
107			msgbox.fadeTo('slow', 0);
108			msgbox.slideUp(341);
109		});
110	});
111
112})(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.