PageSourceSearch

https://www.sagarvalve.com/assets/js/app.js

js sagarvalve.com collected 2026-10-04 04:10:31 UTC 5,797 bytes, 184 lines download raw bytes

1var App = function () {
2
3    function handleIEFixes() {
4        //fix html5 placeholder attribute for ie7 & ie8
5        if (jQuery.browser.msie && jQuery.browser.version.substr(0, 1) < 9) { // ie7&ie8
6            jQuery('input[placeholder], textarea[placeholder]').each(function () {
7                var input = jQuery(this);
8
9                jQuery(input).val(input.attr('placeholder'));
10
11                jQuery(input).focus(function () {
12                    if (input.val() == input.attr('placeholder')) {
13                        input.val('');
14                    }
15                });
16
17                jQuery(input).blur(function () {
18                    if (input.val() == '' || input.val() == input.attr('placeholder')) {
19                        input.val(input.attr('placeholder'));
20                    }
21                });
22            });
23        }
24    }
25
26    function handleBootstrap() {
27        jQuery('.carousel1').carousel({
28            interval: 15000,
29            pause: 'hover'
30        });
31        jQuery('.tooltips').tooltip();
32        jQuery('.popovers').popover();
33    }
34
35    function handleMisc() {
36        jQuery('.top').click(function () {
37            jQuery('html,body').animate({
38                scrollTop: jQuery('body').offset().top
39            }, 'slow');
40        }); //move to top navigator
41    }
42
43    function handleSearch() {    
44        jQuery('.search').click(function () {
45            if(jQuery('.search-btn').hasClass('icon-search')){
46                jQuery('.search-open').fadeIn(500);
47                jQuery('.search-btn').removeClass('icon-search');
48                jQuery('.search-btn').addClass('icon-remove');
49            } else {
50                jQuery('.search-open').fadeOut(500);
51                jQuery('.search-btn').addClass('icon-search');
52                jQuery('.search-btn').removeClass('icon-remove');
53            }   
54        }); 
55    }
56
57    function dropdownMobile() {
58        $('.dropdown-toggle').click(function(e) {
59            // search fix
60            if(jQuery('.search-btn').hasClass('icon-remove')){
61                jQuery('.search-open').fadeOut(500);
62                jQuery('.search-btn').addClass('icon-search');
63                jQuery('.search-btn').removeClass('icon-remove');
64            } else {}
65            e.preventDefault();
66            setTimeout($.proxy(function() {
67                if ('ontouchstart' in document.documentElement) {
68                    $(this).siblings('.dropdown-backdrop').off().remove();
69                }
70            }, this), 0);
71        });
72    }
73
74    // make top menu dropdown animated
75    function animTopMenuDropDown() {
76        $(".header .navbar .nav > li > a").on("click", function () {
77            $(".dropdown-menu li a").css("line-height","10px");
78            $(".dropdown-menu li a").animate({
79                "line-height": "30px"
80            }, 100);
81        });
82    }
83
84    //add/remove class focused to i-elem in navbar form-search
85    function iconFocusInOut() {
86        $(".form-search").on("mouseenter", function () {
87            var current = $(this);
88            current.find("input").on("focus", function () {
89                current.find("i").addClass("focused");
90            });
91        });
92
93        $(".form-search").on("mouseleave", function () {
94            var current = $(this);
95            current.find("input").focusout(function () {
96                current.find("i").removeClass("focused");
97            });
98        });
99    }
100
101    // Add class active to Accordion panel-heading
102    function addActive2PanelHeading() {
103        var heading = $(".acc-home .panel-heading .accordion-toggle");
104        heading.on("click", function () {
105            if (!$(this).parent().hasClass('active')) {
106                heading.parent().removeClass('active');
107            }
108            $(this).parent().toggleClass('active');
109        });
110    }
111
112    return {
113        init: function () {
114            handleBootstrap();
115            handleIEFixes();
116            handleMisc();
117            handleSearch();
118            dropdownMobile();
119            animTopMenuDropDown();
120            iconFocusInOut();
121            addActive2PanelHeading();
122        },
123
124        initSliders: function () {
125            $('#clients-flexslider').flexslider({
126                animation: "slide",
127                easing: "swing",
128                animationLoop: true,
129                itemWidth: 1,
130                itemMargin: 1,
131                minItems: 2,
132                maxItems: 9,
133                controlNav: false,
134                directionNav: false,
135                move: 2
136            });
137            
138            $('#photo-flexslider').flexslider({
139                animation: "slide",
140                controlNav: false,
141                animationLoop: false,
142                itemWidth: 80,
143                itemMargin: 0
144            }); 
145            
146            $('#testimonal_carousel').collapse({
147                toggle: false
148            });
149        },
150
151        initFancybox: function () {
152            jQuery(".fancybox-button").fancybox({
153            groupAttr: 'data-rel',
154            prevEffect: 'none',
155            nextEffect: 'none',
156            closeBtn: true,
157            helpers: {
158                title: {
159                    type: 'inside'
160                    }
161                }
162            });
163        },
164
165        initBxSlider: function () {
166            $('.bxslider').bxSlider({
167                minSlides: 3,
168                maxSlides: 3,
169                slideWidth: 360,
170                slideMargin: 10
171            });            
172        },
173
174        initBxSlider1: function () {
175            $('.bxslider').bxSlider({
176                minSlides: 4,
177                maxSlides: 4,
178                slideWidth: 360,
179                slideMargin: 10
180            });            
181        }
182
183    };
184}();

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.