PageSourceSearch

https://www.theironsmystic.com/wp-content/themes/iron-restaurant/js/main.js?ver=1.1

js theironsmystic.com collected 2026-10-04 01:32:42 UTC 5,230 bytes, 172 lines download raw bytes

1(function ($) {
2    $(document).ready(function () {
3        //Start of functions
4
5        //retail rail - fade on scroll (mobile)
6        /*$(window).scroll(function () {
7            if ($(this).scrollTop() > 0) {
8                $('#retail-rail').fadeOut()
9            }
10        });
11
12        //retail rail - fade on mousewheel turn
13        (function () {
14            var supportOffset = window.pageYOffset !== undefined,
15                lastKnownPos = 0,
16                ticking = false,
17                scrollDir,
18                currYPos
19
20            function doSomething(scrollPos, scrollDir) {
21                $('#retail-rail').fadeOut()
22                // console.log('scroll pos: ' + scrollPos + ' | scroll dir: ' + scrollDir);
23            }
24
25            window.addEventListener('wheel', function (e) {
26                currYPos = supportOffset ? window.pageYOffset : document.body.scrollTop
27                scrollDir = lastKnownPos > currYPos ? 'up' : 'down'
28                lastKnownPos = currYPos
29
30                if (!ticking) {
31                    window.requestAnimationFrame(function () {
32                        doSomething(lastKnownPos, scrollDir)
33                        ticking = false
34                    })
35                }
36                ticking = true
37            })
38        })()*/
39
40        //retail rail - close
41        $('#retail-rail-close').click(function (e) {
42            e.preventDefault()
43            $('#retail-rail').fadeOut()
44        })
45
46
47        //slick slides - Events Section
48        $('.events .slideshow').slick({
49            lazyLoad: 'ondemand',
50            infinite: true,
51            slidesToShow: 4,
52            slidesToScroll: 1,
53            autoplay: false,
54            arrows: true,
55            speed: 500,
56            dots: false,
57            responsive: [
58                {
59                    breakpoint: 9999,
60                    settings: {
61                        slidesToShow: 4
62                    }
63                },
64                {
65                    breakpoint: 1470,//was 1520
66                    settings: {
67                        slidesToShow: 3
68                    }
69                },
70                {
71                    breakpoint: 1040,
72                    settings: {
73                        slidesToShow: 2
74                    }
75                },
76                {
77                    breakpoint: 770,//was 780
78                    settings: {
79                        slidesToShow: 1
80                    }
81                }
82            ]
83        })
84
85        // slick - Gallery section
86        $('.gallerz .slideshow').slick({
87            lazyLoad: 'ondemand',
88            infinite: true,
89            slidesToShow: 4,
90            slidesToScroll: 1,
91            //autoplay: true,
92            arrows: true,
93            speed: 250,
94            dots: false,
95            responsive: [
96                {
97                    breakpoint: 9999,
98                    settings: {
99                        slidesToShow: 4
100                    }
101                },
102                {
103                    breakpoint: 1300,
104                    settings: {
105                        slidesToShow: 3
106                    }
107                },
108                {
109                    breakpoint: 1023,
110                    settings: {
111                        slidesToShow: 2
112                    }
113                },
114                {
115                    breakpoint: 650,
116                    settings: {
117                        slidesToShow: 1
118                    }
119                }
120            ]
121        })
122
123
124        $(".restaurant-tile").after('<a class="footer-number" href="tel:860-572-0731">Telephone: 860-572-0731</a>')
125        //End of funtions
126
127        $('.cp-modal__bg, .cp-modal__close').on('click', function () {
128            $('.cp-modal').removeClass('is-active')
129        })
130
131        var mobileContact = function () {
132            $('.reservations-widget a[href="#find-us"]').on('click', function () {
133                $('nav.main-nav ul li a[href="#find-us"]').trigger('click')
134            })
135        }
136        mobileContact()
137
138
139        $(window).load(function () {
140
141            $('.cp-modal').addClass('is-active')
142            $('.cp-modal__close').focus()
143            setTimeout(function () {
144                $('.cp-modal').focus()
145            }, 300)
146
147            //booking widget - stop tabbing outside
148            var $element = $('.cp-modal')
149            var inputs = $element.find('select, input, textarea, button, a').filter(':visible')
150            var firstInput = inputs.first()
151            var lastInput = inputs.last()
152            /*set focus on first input*/
153            firstInput.focus()
154            /*redirect last tab to first input*/
155            lastInput.on('keydown', function (e) {
156                if ((e.which === 9 && !e.shiftKey)) {
157                    e.preventDefault()
158                    firstInput.focus()
159                }
160            })
161            /*redirect first shift+tab to last input*/
162            firstInput.on('keydown', function (e) {
163                if ((e.which === 9 && e.shiftKey)) {
164                    e.preventDefault()
165                    lastInput.focus()
166                }
167            })
168
169        })
170
171    })
172})(window.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.