PageSourceSearch

https://sail.co.in/themes/custom_sail/assets/dist/js/main.js

js sail.co.in collected 2026-10-02 06:40:42 UTC 7,570 bytes, 272 lines download raw bytes

1jQuery(function($) {
2
3
4
5    $(".innerbanner").next().css("padding-top", "96px");
6
7    // hover update for menu 
8
9    // $('.dropdown').off('mouseenter mouseleave');
10
11    // $(document).on('click', function(e) {
12    //     if (!$(e.target).closest('.dropdown').length) {
13    //         $('.dropdown-menu').removeClass('show');
14    //         $('.dropdown-toggle').attr('aria-expanded', 'false');
15    //     }
16    // });
17
18    // $('.dropdown-toggle').on('click', function(e) {
19    //     e.preventDefault();
20    //     let $dropdownMenu = $(this).next('.dropdown-menu');
21    //     let isShown = $dropdownMenu.hasClass('show');
22
23    //     $('.dropdown-menu').removeClass('show');
24    //     $('.dropdown-toggle').attr('aria-expanded', 'false');
25
26    //     if (!isShown) {
27    //         $dropdownMenu.addClass('show');
28    //         $(this).attr('aria-expanded', 'true');
29    //     }
30    // });
31
32
33
34    // tabbing js 
35
36
37
38
39    // news ticker js 
40
41    $(document).ready(function() {
42        const $ticker = $('#newsTicker');
43        const $toggleBtn = $('#toggleBtn');
44        let isPaused = false;
45        $toggleBtn.html('<span class="bn-pause"></span>');
46
47        $toggleBtn.on('click', function() {
48            isPaused = !isPaused;
49            $ticker.toggleClass('paused', isPaused);
50
51            if (isPaused) {
52                $toggleBtn.html('<span class="bn-play"></span>');
53            } else {
54                $toggleBtn.html('<span class="bn-pause"></span>');
55            }
56        });
57    });
58
59
60    // Equal Height JS:
61    var $small_only = window.matchMedia("(max-width: 767px)"),
62        $medium_up = window.matchMedia("(min-width: 768px)"),
63        $medium_only = window.matchMedia("(min-width: 768px) and (max-width: 970px)"),
64        $large_up = window.matchMedia("(min-width: 971px)"),
65        $large_only = window.matchMedia("(min-width: 971px) and (max-width: 1024px)"),
66        $xlarge_up = window.matchMedia("(min-width: 1025px)"),
67        $xlarge_only = window.matchMedia("(min-width: 1025px) and (max-width: 2500px)");
68
69    // set same height for all cssClass-elements on medium-up
70    function equalizer(cssClass) {
71        var wrapper = $(cssClass).parent();
72        var x = wrapper.prevObject.length;
73        var y = 3; // number of columns
74        var quotient = Math.floor(x / y);
75        var padding = 10; // user defined distance to bottom
76        var max = 0;
77
78        $(cssClass).css('height', 'auto'); // reset
79
80        if ($medium_up.matches) {
81            $(cssClass).each(function() {
82                if ($(this).height() > max) max = $(this).height() + padding;
83            });
84            $(cssClass).height(max + padding);
85        }
86
87        wrapper.css('margin-bottom', (padding * quotient) + 'px');
88    }
89
90    $(window).on('load resize', function() {
91        equalizer('.tabpen li');
92    });
93    // $('.navbar-nav').find('li').click(function() {
94    //     $('li').find('ul').stop(true, true).slideUp('fast');
95    //     $(this).find('>ul').stop(true, true).slideToggle('fast');
96    //     return false;
97    // });
98
99    // Accordion
100
101
102
103
104    $('.sidebar-navigation ul li:first-child span').addClass('current');
105    $('.nav-item span').on('click', function() {
106        if ($(this).next().is(':hidden')) {
107            $('.nav-item span').removeClass('current').next().slideUp();
108
109            $(this).toggleClass('current').next().slideDown();
110        } else {
111            $(this).removeClass('current');
112            $(this).next().slideUp();
113        }
114        return false;
115    });
116
117    // Popup js by sukanta 2-1-2025
118    $(".popupClose").click(function(e) {
119        e.preventDefault();
120        $(".languagePopup").fadeOut("fast");
121    });
122
123    // Popup js by sukanta end 2-1-2025
124
125
126    // $('.product-slider').owlCarousel({
127    //     loop: true,
128    //     margin: 30,
129    //     nav: true,
130    //     responsive: {
131    //         0: {
132    //             items: 1.25
133    //         },
134    //         600: {
135    //             items: 1.25
136    //         },
137    //         1000: {
138    //             items: 4.25
139    //         },
140    //         1300: {
141    //             items: 5.25
142    //         }
143    //     }
144    // });
145    // var owl = $(".product-slider");
146    // owl.owlCarousel();
147    // $(".next-btn").click(function() {
148    //     owl.trigger("next.owl.carousel");
149    // });
150    // $(".prev-btn").click(function() {
151    //     owl.trigger("prev.owl.carousel");
152    // });
153    // $(".prev-btn").addClass("disabled");
154    // $(owl).on("translated.owl.carousel", function(event) {
155    //     if ($(".owl-prev").hasClass("disabled")) {
156    //         $(".prev-btn").addClass("disabled");
157    //     } else {
158    //         $(".prev-btn").removeClass("disabled");
159    //     }
160    //     if ($(".owl-next").hasClass("disabled")) {
161    //         $(".next-btn").addClass("disabled");
162    //     } else {
163    //         $(".next-btn").removeClass("disabled");
164    //     }
165    // });
166
167    $("<em></em>").appendTo(".fix-foot-social");
168    $('.fix-foot-social em').click(function() {
169        $(this).fadeOut();
170        $(this).parent().addClass('change');
171    });
172
173    $(document).mouseup(function(e) {
174        if ($(e.target).closest(".field,.navbar").length === 0) {
175            $(".fix-foot-social").removeClass('change');
176            $('.fix-foot-social em').fadeIn();
177            $('.chat_boat').hide();
178        }
179    });
180
181    $('.open_chat').click(function(e) {
182        e.preventDefault();
183        $('.chat_boat').fadeToggle();
184    });
185
186    var ps = $('.plant-slider');
187    var psg = $('.plant-slider-group');
188
189    ps.owlCarousel({
190        loop: true,
191        margin: 30,
192        autoplay: true,
193        autoplayTimeout: 5000,
194        autoplayHoverPause: true,
195        nav: true,
196        mouseDrag: false,
197        touchDrag: false,
198        dots: false,
199        startPosition: 0,
200        /*onChange:function(e){
201	  var itm = $(".plant-slider .owl-stage").find(".owl-item").length;
202	  //console.log(e.items.count);
203	  console.log(itm);
204	  if(e.item.index > e.property.value && e.item.index != (itm - 2)){
205	    psg.trigger('prev.owl.carousel');
206	  }
207	  else{
208	    if(e.item.index == 1){
209		psg.trigger('prev.owl.carousel');
210		}
211		else
212	    psg.trigger('next.owl.carousel');
213	  }
214	  console.log(e.item.index); // returns index of active item before update
215      console.log(e.property.value); // return index of now active item
216	  console.log(e.property.dragDirection);
217	  //console.log(currentItem);
218	  //$('.js-navigation-carousel').trigger('to.owl.carousel', current);
219	},*/
220        responsive: {
221            0: {
222                items: 1
223            },
224            600: {
225                items: 2
226            },
227            1000: {
228                items: 2
229            },
230            1300: {
231                items: 2
232            }
233        }
234    });
235
236    psg.owlCarousel({
237        loop: true,
238        margin: 30,
239        autoplay: false,
240        mouseDrag: false,
241        touchDrag: false,
242        startPosition: 0,
243        // responsive: {
244        //     0: {
245        //         items: 2.15
246        //     },
247        //     600: {
248        //         items: 2.15
249        //     },
250        //     1000: {
251        //         items: 2.15
252        //     },
253        //     1350: {
254        //         items: 2.15
255        //     }
256        // }
257    });
258
259    $(".plant-slider .owl-prev").on("click", function(event) {
260        psg.trigger("prev.owl.carousel");
261    });
262
263    $(".plant-slider .owl-next").on("click", function(event) {
264        psg.trigger("next.owl.carousel");
265    });
266
267
268    $(".sr-only").remove();
269
270
271
272}); //End 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.