PageSourceSearch

https://pizzadrive.fi/food1/js/functions.js

js pizzadrive.fi collected 2026-10-02 01:01:28 UTC 3,619 bytes, 123 lines download raw bytes

1/* ==============================================
2	Preload
3=============================================== */
4$(window).load(function() { // makes sure the whole site is loaded
5	$('#status').fadeOut(); // will first fade out the loading animation
6	$('#preloader').delay(250).fadeOut('slow'); // will fade out the white DIV that covers the website.
7	// $('body').delay(250).css({'overflow':'visible'});
8	$('body').delay(250);
9	$('#sub_content').addClass('animated zoomIn');
10	$(window).scroll();
11	$('.number').each(function () {
12    $(this).prop('Counter',0).animate({
13        Counter: $(this).text()
14    }, {
15        duration: 2000,
16        easing: 'swing',
17        step: function (now) {
18            $(this).text(Math.ceil(now));
19        }
20    });
21});
22})
23/* ==============================================
24	Sticky nav
25=============================================== */
26$(window).scroll(function(){
27    'use strict';
28    if ($(this).scrollTop() > 1){  
29        $('header').addClass("sticky");
30    }
31    else{
32        $('header').removeClass("sticky");
33    }
34});
35/* ==============================================
36	Common
37=============================================== */
38new WOW().init();
39
40jQuery(function($) {
41	"use strict";
42	function centerModal() {
43		$(this).css('display', 'block');
44		var $dialog = $(this).find(".modal-dialog"),
45			offset = ($(window).height() - $dialog.height()) / 2,
46			bottomMargin = parseInt($dialog.css('marginBottom'), 10);
47		if (offset < bottomMargin) offset = bottomMargin;
48		$dialog.css("margin-top", offset);
49	}
50	$('.modal').on('show.bs.modal', centerModal);
51	$('.modal-popup .close-link').click(function(event){
52		event.preventDefault();
53		$('.modal').modal('hide');
54	});
55	$(window).on("resize", function() {
56		$('.modal:visible').each(centerModal);
57	});
58});
59
60<!-- Magnific popup -->	
61$(function () {
62'use strict';
63$('.video_pop').magnificPopup({type:'iframe'});	/* video modal*/
64/* Gallery images modal*/
65$('.magnific-gallery').each(function() {
66    $(this).magnificPopup({
67        delegate: 'a', 
68        type: 'image',
69        gallery:{enabled:true},
70		removalDelay: 500, //delay removal by X to allow out-animation
71  callbacks: {
72    beforeOpen: function() {
73      // just a hack that adds mfp-anim class to markup 
74       this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim');
75       this.st.mainClass = this.st.el.attr('data-effect');
76    }
77  },
78  closeOnContentClick: true,
79  midClick: true // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source.
80    });
81}); 
82}); 
83
84<!-- Radio and checkbox styles -->	
85$('input.icheck').iCheck({
86   checkboxClass: 'icheckbox_square-grey',
87   radioClass: 'iradio_square-grey'
88 });
89 
90<!-- Collapse filters close on mobile-->	
91$(window).bind('resize load',function(){
92if( $(this).width() < 991 )
93{
94$('.collapse#collapseFilters').removeClass('in');
95$('.collapse#collapseFilters').addClass('out');
96}
97else
98{
99$('.collapse#collapseFilters').removeClass('out');
100$('.collapse#collapseFilters').addClass('in');
101}   
102});
103
104<!-- Tooltip -->	
105$('.tooltip-1').tooltip({html:true});
106
107<!-- Pace holder -->	
108$('input, textarea').placeholder();
109
110<!-- Accordion -->	
111function toggleChevron(e) {
112    $(e.target)
113        .prev('.panel-heading')
114        .find("i.indicator")
115        .toggleClass('icon_plus_alt2 icon_minus_alt2');
116}
117$('.panel-group').on('hidden.bs.collapse shown.bs.collapse', toggleChevron);
118
119<!-- Cat nav onclick active -->	
120$('ul#cat_nav li a').on('click', function(){
121    $('ul#cat_nav li a.active').removeClass('active');
122    $(this).addClass('active');
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.