PageSourceSearch

https://www.hiphop4ever.fr/wp-content/themes/the-newswire/library/js/scripts.js?ver=1.0.0

js hiphop4ever.fr collected 2026-10-02 12:40:13 UTC 3,847 bytes, 166 lines download raw bytes

1
2jQuery(document).ready(function($){
3	
4	var $window = $(window),
5        $menu = $('div.menu'),
6		$topmenu = $('div.menu-top');
7	
8	function checkWindowSize() {
9		var width = $window.width();
10		if ( width < 824 ) {
11			return $menu.addClass('nav-mobile');
12		}
13		$menu.removeClass('nav-mobile');
14	}
15	
16	function topWindowSize() {
17		var width = $window.width();
18		if ( width < 641 ) {
19			return $topmenu.addClass('top-nav-mobile');
20		}
21		$topmenu.removeClass('top-nav-mobile');
22	}
23	
24	$window
25        .resize(checkWindowSize)
26        .trigger('checkWindowSize');
27		
28		
29	checkWindowSize();
30	
31	$window
32        .resize(topWindowSize)
33        .trigger('topWindowSize');
34		
35	topWindowSize();
36	
37	/* prepend menu icon */
38	$('div.menu').append('<div id="menu-icon">Menu</div>');
39	$('div.menu-top').append('<div id="top-menu-icon">Top Menu</div>');
40	
41	
42	/* toggle nav */
43	$("#menu-icon").on("click", function(){
44		$("div.menu > ul").slideToggle();
45		$(this).toggleClass("active");
46	});
47	
48	$("#top-menu-icon").on("click", function(){
49		$("div.top-nav-mobile > ul").slideToggle();
50		$(this).toggleClass("active");
51	});
52	
53	/* toggle search box */
54	$("#search-icon").on("click", function(){
55		$("#search-box-wrap").slideToggle();
56	});
57	
58	$("#close-x").on("click", function(){
59		$("#search-box-wrap").slideUp();
60	});
61	
62
63	/* jquery cycle */
64	var $slider = $('.cycle-slideshow');
65	$slider.imagesLoaded( function() {
66		$('#load-cycle').hide(); /* preloader */
67		$slider.slideDown(1000);
68	});
69	
70	var $container = $('#grid-wrap');
71	
72	$container.masonry({
73	  itemSelector : '.grid-box',
74	});
75	
76	$container.imagesLoaded( function() {
77	  $container.masonry({
78		  itemSelector : '.grid-box',
79	  });
80	});
81	
82	$(window).resize(function() {
83		$container.masonry({
84		  itemSelector : '.grid-box',
85		});
86	});
87	
88	var $container2 = $('#grid-wrap-2');
89	
90	$container2.masonry({
91	  itemSelector : '.grid-box',
92	  stamp: ".widget-area-wrap",
93	  gutter: ".gutter-sizer",
94	});
95	
96	$container2.imagesLoaded( function() {
97	  $container2.masonry({
98		  itemSelector : '.grid-box',
99	  });
100	});
101	
102	$(window).resize(function() {
103		$container2.masonry({
104		  itemSelector : '.grid-box',
105		});
106	});
107
108	// By Chris Coyier & tweaked by Mathias Bynens
109
110	// Find all YouTube videos
111	var $allVideos = $('iframe[src^="http://player.vimeo.com"], iframe[src^="//player.vimeo.com"], iframe[src^="http://www.youtube.com"], iframe[src^="//www.youtube.com"], iframe[src^="http://www.dailymotion.com"], iframe[src^="//www.dailymotion.com"]'),
112
113	    // The element that is fluid width
114	    $fluidEl = $(".post-content");
115		
116
117	// Figure out and save aspect ratio for each video
118	$allVideos.each(function() {
119
120		$(this)
121			.data('aspectRatio', this.height / this.width)
122			
123			// and remove the hard coded width/height
124			.removeAttr('height')
125			.removeAttr('width');
126
127	});
128
129
130	// When the window is resized
131	// (You'll probably want to debounce this)
132	$(window).resize(function() {
133
134		var newWidth = $fluidEl.width();
135		
136		// Resize all videos according to their own aspect ratio
137		$allVideos.each(function() {
138
139			var $el = $(this);
140			$el
141				.width(newWidth)
142				.height(newWidth * $el.data('aspectRatio'));
143
144		});
145
146	// Kick off one resize to fix all videos on page load
147	}).resize();
148	
149	// Fix for Safari
150	
151	var fixSafariMargin = function() {
152		// check if the browser is Safari
153		if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {                  
154			$('footer[role=contentinfo]').css('display', 'block');
155			$('#site-generator').css('display', 'block');
156			$('#site-generator').css('padding-top', '25px');
157		}
158	}
159	
160	fixSafariMargin();
161	
162	$(window).resize(function() {
163		fixSafariMargin();
164	});
165
166});

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.