PageSourceSearch

https://www.derintarih.com/wp-content/themes/magaziner/js/scripts.js?ver=7.1.2

js derintarih.com collected 2026-10-02 11:06:29 UTC 6,300 bytes, 218 lines download raw bytes

1/*
2	scripts.js
3	
4	License: GNU General Public License v3.0
5	License URI: http://www.gnu.org/licenses/gpl-3.0.html
6	
7	Copyright: (c) 2013 Alexander "Alx" Agnarson, http://alxmedia.se
8*/
9
10"use strict";
11
12jQuery(document).ready(function($) {
13
14/*  Toggle header search
15/* ------------------------------------ */
16	$('.toggle-search').click(function(){
17		$('.toggle-search').toggleClass('active');
18		$('.search-expand').fadeToggle(250);
19            setTimeout(function(){
20                $('.search-expand input').focus();
21            }, 300);
22	});
23	
24/*  Scroll to top
25/* ------------------------------------ */
26	$('a#back-to-top').click(function() {
27		$('html, body').animate({scrollTop:0},'slow');
28		return false;
29	});
30	
31/*  Tabs widget
32/* ------------------------------------ */	
33	(function() {
34		var $tabsNav       = $('.alx-tabs-nav'),
35			$tabsNavLis    = $tabsNav.children('li'),
36			$tabsContainer = $('.alx-tabs-container');
37
38		$tabsNav.each(function() {
39			var $this = $(this);
40			$this.next().children('.alx-tab').stop(true,true).hide()
41			.siblings( $this.find('a').attr('href') ).show();
42			$this.children('li').first().addClass('active').stop(true,true).show();
43		});
44
45		$tabsNavLis.on('click', function(e) {
46			var $this = $(this);
47
48			$this.siblings().removeClass('active').end()
49			.addClass('active');
50			
51			$this.parent().next().children('.alx-tab').stop(true,true).hide()
52			.siblings( $this.find('a').attr('href') ).fadeIn();
53			e.preventDefault();
54		}).children( window.location.hash ? 'a[href=' + window.location.hash + ']' : 'a:first' ).trigger('click');
55
56	})();
57	
58/*  Comments / pingbacks tabs
59/* ------------------------------------ */	
60    $(".comment-tabs li").click(function() {
61        $(".comment-tabs li").removeClass('active');
62        $(this).addClass("active");
63        $(".comment-tab").hide();
64        var selected_tab = $(this).find("a").attr("href");
65        $(selected_tab).fadeIn();
66        return false;
67    });
68
69/*  Table odd row class
70/* ------------------------------------ */
71	//$('table tr:odd').addClass('alt');
72
73/*  Sidebar collapse
74/* ------------------------------------ */
75	$('body').addClass('s1-collapse');
76	$('body').addClass('s2-collapse');
77	
78	$('.s1 .sidebar-toggle').click(function(){
79		$('body').toggleClass('s1-collapse').toggleClass('s1-expand');
80		if ($('body').is('.s2-expand')) { 
81			$('body').toggleClass('s2-expand').toggleClass('s2-collapse');
82		}
83	});
84	$('.s2 .sidebar-toggle').click(function(){
85		$('body').toggleClass('s2-collapse').toggleClass('s2-expand');
86		if ($('body').is('.s1-expand')) { 
87			$('body').toggleClass('s1-expand').toggleClass('s1-collapse');
88		}
89	});
90
91/*  Dropdown menu animation
92/* ------------------------------------ */
93	$('.nav ul.sub-menu').hide();
94	$('.nav li').hover( 
95		function() {
96			$(this).children('ul.sub-menu').slideDown('fast');
97		}, 
98		function() {
99			$(this).children('ul.sub-menu').hide();
100		}
101	);
102
103/*  Fitvids
104/* ------------------------------------ */
105	function responsiveVideo() {
106			if ( $().fitVids ) {
107				$('#wrapper').fitVids();
108			}	
109		}
110		
111	responsiveVideo();
112	
113/*  Owl Carousel
114/* ------------------------------------ */
115	$("#owl-featured").owlCarousel({
116		navigation : false,
117		items : 5,
118		itemsDesktop : [1280,4],
119		itemsDesktopSmall : [1024,3],
120		itemsTablet: [768,2],
121		itemsTabletSmall: [568,1],
122		itemsMobile : [479,1],
123	});
124	
125/*  Mobile menu smooth toggle height
126/* ------------------------------------ */	
127	$('.nav-toggle').on('click', function() {
128		slide($('.nav-wrap .nav', $(this).parent()));
129	});
130	 
131	function slide(content) {
132		var wrapper = content.parent();
133		var contentHeight = content.outerHeight(true);
134		var wrapperHeight = wrapper.height();
135	 
136		wrapper.toggleClass('expand');
137		if (wrapper.hasClass('expand')) {
138		setTimeout(function() {
139			wrapper.addClass('transition').css('height', contentHeight);
140		}, 10);
141	}
142	else {
143		setTimeout(function() {
144			wrapper.css('height', wrapperHeight);
145			setTimeout(function() {
146			wrapper.addClass('transition').css('height', 0);
147			}, 10);
148		}, 10);
149	}
150	 
151	wrapper.one('transitionEnd webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd', function() {
152		if(wrapper.hasClass('open')) {
153			wrapper.removeClass('transition').css('height', 'auto');
154		}
155	});
156	}
157	
158/*  Swiper Slider
159/* ------------------------------------ */	
160
161    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
162        var speed = 600;
163        var followFinger = true;
164        var simulateTouch = true;
165		
166		var swiperIndex = new Swiper('.swiper-index', {
167			pagination: '.pagination-index',
168			paginationClickable: true,
169            onSlideChangeStart: function () {
170                //sliderheight();
171            },
172            speed: speed,
173            followFinger: followFinger,
174            simulateTouch: simulateTouch,
175		});
176		
177		var swiperWriter = new Swiper('.swiper-writer', {
178			pagination: false,
179			slidesPerView: 'auto',
180			nextButton: '.buttons-writer .swiper-button-next',
181			prevButton: '.buttons-writer .swiper-button-prev',
182		});
183    }
184    else {
185        var speed = 0;
186        var followFinger = false;
187        var simulateTouch = false;
188		
189		var swiperIndex = new Swiper('.swiper-index', {
190			pagination: '.pagination-index',
191			nextButton: '.buttons-index .swiper-button-next',
192			prevButton: '.buttons-index .swiper-button-prev',
193			paginationClickable: true,
194			loop: true,
195			paginationBulletRender: function (index, className) {
196				return '<span class="' + className + '">' + (index + 1) + '</span>';
197			},
198			effect: 'fade',
199            speed: speed,
200            followFinger: followFinger,
201            simulateTouch: simulateTouch
202		});
203		
204		var swiperWriter = new Swiper('.swiper-writer', {
205			pagination: false,
206			slidesPerView: 4,
207			spaceBetween: 0,
208			nextButton: '.buttons-writer .swiper-button-next',
209			prevButton: '.buttons-writer .swiper-button-prev',
210		});
211		
212		
213    }
214		$("body").on("hover",".pagination-index .swiper-pagination-bullet", function() { 
215			var active = $(this).index() + 1;
216			swiperIndex.slideTo(active, 100, true);
217		});
218});

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.