PageSourceSearch

http://www.anythingtosay.com/js/script.js

js anythingtosay.com collected 2026-10-02 10:05:36 UTC 2,873 bytes, 123 lines download raw bytes

1// JavaScript Document
2
3$(function() {
4
5	// Remove .no-js class
6	$('html').removeClass('no-js');
7	
8	// Mail antispam
9	$('.email').each(function(){
10		var mail = $(this).text();
11		mail = mail.replace('[nospam]','@');	
12		$(this).replaceWith('<span class="email"><a href="mailto:' + mail + '" class="pref">' + mail + '</a></span>');
13	});
14	
15	
16	
17
18
19		// List Styling
20	$('li:nth-child(odd)').addClass('odd');
21	$('li:nth-child(even)').addClass('even'); 
22	$('li:first-child').addClass('first');
23	$('li:last-child').addClass('last');
24	$('.accordion > div:first-child').addClass('first');
25	$('.accordion > div:last-child').addClass('last');	
26	
27	$('.text-format ul li, .text-format ol li').wrapInner('<span> </span>');
28	
29	
30	
31	
32	// Mobile Nav Toggle
33	$('.nav-toggle').click(function () {
34		$('.nav-pane').toggleClass('active');
35		$(this).toggleClass('active');
36	});
37	
38			// Accordion List
39	$('ul.accordion .pane').hide();
40	$('ul.accordion > li').click(function () {
41		$('ul.accordion > li').removeClass('active');
42		$('.pane').slideUp('normal');
43		if ($(this).children('.pane').is(':hidden') == true) {
44			$(this).addClass('active');
45			$(this).children('.pane').slideDown('normal');
46		}
47	});
48	
49	$('.gallery-container').each(function () {
50		var toggle = $(this).find('.toggle-more');
51			toggle.click(function () {
52				$(this).toggleClass('open');
53					if ($(this).hasClass('open')) {
54						$(this).text("chiudi");
55					} else {
56						$(this).text("guarda tutte le foto");
57					}
58			});
59	});		
60	
61	
62/*	$('.gallery-container').each(function () {
63		var toggle = $(this).find('.toggle-more');
64		var targetID = $(this).find('.gallery-more').attr('id')
65		var targetID_less = $(this).find('.gallery-less').attr('id')
66			toggle.click(function () {
67				$(this).toggleClass('open');
68				if ($('#'+targetID).is(':hidden') == true){
69					$('#'+targetID).show();
70					$('#'+targetID_less).hide();
71					}else {
72						$('#'+targetID).hide();
73						$('#'+targetID_less).show();
74					};
75					if ($(this).hasClass('open')) {
76						$(this).text("chiudi");
77					} else {
78						$(this).text("guarda tutte le foto");
79					}
80			});
81	});		*/
82	
83	
84	
85	
86	// Scroll Button without Plugin
87	jQuery('.scroll-btn').bind('click.smoothscroll', function (e) {
88		e.preventDefault();
89
90		var target = this.hash,
91		jQuerytarget = jQuery(target);
92
93		jQuery('html, body').stop().animate({
94			'scroll-top': jQuerytarget.offset().top
95		}, 900, 'swing', function () {
96			window.location.hash = target;
97		});
98		
99	});		
100			
101		// Top Scroll Button
102	$(window).scroll(function () {
103		if ($(window).scrollTop() == 0) {
104			$('.scroll-top').fadeOut("fast");
105		} else {
106			$('.scroll-top').fadeIn("fast");
107		}
108
109	});
110			
111			
112/* header fixed*/			
113$('a.scroll[href*="#"]').bind('click', function() {
114  	$('html, body').animate({
115            scrollTop: $('#' + this.hash.slice(1)).offset().top
116        }, 1000);
117		return false;
118
119	});
120	
121	
122			
123});

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.