PageSourceSearch

https://indiabudget.gov.in/js/main.js

js indiabudget.gov.in collected 2026-09-24 08:41:09 UTC 6,000 bytes, 241 lines download raw bytes

1/* AOS.init({
2 	duration: 800,
3 	easing: 'slide',
4 	once: true
5 });
6*/
7jQuery(document).ready(function($) {
8
9	"use strict";
10	
11	var siteMenuClone = function() {
12
13		$('.js-clone-nav').each(function() {
14			var $this = $(this);
15			$this.clone().attr('class', 'site-nav-wrap').appendTo('.site-mobile-menu-body');
16		});
17
18
19		setTimeout(function() {
20			
21			var counter = 0;
22      $('.site-mobile-menu .has-children').each(function(){
23        var $this = $(this);
24        
25        $this.prepend('<span class="arrow-collapse collapsed">');
26
27        $this.find('.arrow-collapse').attr({
28          'data-toggle' : 'collapse',
29          'data-target' : '#collapseItem' + counter,
30        });
31
32        $this.find('> ul').attr({
33          'class' : 'collapse',
34          'id' : 'collapseItem' + counter,
35        });
36
37        counter++;
38
39      });
40
41    }, 1000);
42
43		$('body').on('click', '.arrow-collapse', function(e) {
44      var $this = $(this);
45      if ( $this.closest('li').find('.collapse').hasClass('show') ) {
46        $this.removeClass('active');
47      } else {
48        $this.addClass('active');	
49      }
50      e.preventDefault();  
51      
52    });
53
54		$(window).resize(function() {
55			var $this = $(this),
56				w = $this.width();
57
58			if ( w > 768 ) {
59				if ( $('body').hasClass('offcanvas-menu') ) {
60					$('body').removeClass('offcanvas-menu');
61				}
62			}
63		})
64
65		$('body').on('click', '.js-menu-toggle', function(e) {
66			var $this = $(this);
67			e.preventDefault();
68
69			if ( $('body').hasClass('offcanvas-menu') ) {
70				$('body').removeClass('offcanvas-menu');
71				$this.removeClass('active');
72			} else {
73				$('body').addClass('offcanvas-menu');
74				$this.addClass('active');
75			}
76		}) 
77
78		// click outisde offcanvas
79		$(document).mouseup(function(e) {
80	    var container = $(".site-mobile-menu");
81	    if (!container.is(e.target) && container.has(e.target).length === 0) {
82	      if ( $('body').hasClass('offcanvas-menu') ) {
83					$('body').removeClass('offcanvas-menu');
84				}
85	    }
86		});
87	}; 
88	siteMenuClone();
89
90
91	var sitePlusMinus = function() {
92		$('.js-btn-minus').on('click', function(e){
93			e.preventDefault();
94			if ( $(this).closest('.input-group').find('.form-control').val() != 0  ) {
95				$(this).closest('.input-group').find('.form-control').val(parseInt($(this).closest('.input-group').find('.form-control').val()) - 1);
96			} else {
97				$(this).closest('.input-group').find('.form-control').val(parseInt(0));
98			}
99		});
100		$('.js-btn-plus').on('click', function(e){
101			e.preventDefault();
102			$(this).closest('.input-group').find('.form-control').val(parseInt($(this).closest('.input-group').find('.form-control').val()) + 1);
103		});
104	};
105	// sitePlusMinus();
106
107
108	var siteSliderRange = function() {
109    $( "#slider-range" ).slider({
110      range: true,
111      min: 0,
112      max: 500,
113      values: [ 75, 300 ],
114      slide: function( event, ui ) {
115        $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
116      }
117    });
118    $( "#amount" ).val( "$" + $( "#slider-range" ).slider( "values", 0 ) +
119      " - $" + $( "#slider-range" ).slider( "values", 1 ) );
120	};
121	// siteSliderRange();
122
123
124	var siteMagnificPopup = function() {
125		$('.image-popup').magnificPopup({
126	    type: 'image',
127	    closeOnContentClick: true,
128	    closeBtnInside: false,
129	    fixedContentPos: true,
130	    mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
131	     gallery: {
132	      enabled: true,
133	      navigateByImgClick: true,
134	      preload: [0,1] // Will preload 0 - before current, and 1 after the current image
135	    },
136	    image: {
137	      verticalFit: true
138	    },
139	    zoom: {
140	      enabled: true,
141	      duration: 300 // don't foget to change the duration also in CSS
142	    }
143	  });
144
145	  $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
146	    disableOn: 700,
147	    type: 'iframe',
148	    mainClass: 'mfp-fade',
149	    removalDelay: 160,
150	    preloader: false,
151
152	    fixedContentPos: false
153	  });
154	};
155	siteMagnificPopup();
156
157
158	var siteCarousel = function () {
159		if ( $('.nonloop-block-13').length > 0 ) {
160			$('.nonloop-block-13').owlCarousel({
161		    center: false,
162		    items: 1,
163		    loop: true,
164				stagePadding: 0,
165		    margin: 0,
166		    autoplay: true,
167		    nav: true,
168				navText: ['<span class="icon-arrow_back">', '<span class="icon-arrow_forward">'],
169		    responsive:{
170	        600:{
171	        	margin: 0,
172	        	nav: true,
173	          items: 2
174	        },
175	        1000:{
176	        	margin: 0,
177	        	stagePadding: 0,
178	        	nav: true,
179	          items: 3
180	        },
181	        1200:{
182	        	margin: 0,
183	        	stagePadding: 0,
184	        	nav: true,
185	          items: 4
186	        }
187		    }
188			});
189		}
190
191		$('.slide-one-item').owlCarousel({
192	    center: false,
193	    items: 1,
194	    loop: true,
195			stagePadding: 0,
196	    margin: 0,
197	    autoplay: true,
198	    pauseOnHover: false,
199	    nav: true,
200	    navText: ['<span class="icon-keyboard_arrow_left">', '<span class="icon-keyboard_arrow_right">']
201	  });
202	};
203	siteCarousel();
204
205	var siteStellar = function() {
206		$(window).stellar({
207	    responsive: false,
208	    parallaxBackgrounds: true,
209	    parallaxElements: true,
210	    horizontalScrolling: false,
211	    hideDistantElements: false,
212	    scrollProperty: 'scroll'
213	  });
214	};
215	siteStellar();
216
217	var siteCountDown = function() {
218
219		$('#date-countdown').countdown('2020/10/10', function(event) {
220		  var $this = $(this).html(event.strftime(''
221		    + '<span class="countdown-block"><span class="label">%w</span> weeks </span>'
222		    + '<span class="countdown-block"><span class="label">%d</span> days </span>'
223		    + '<span class="countdown-block"><span class="label">%H</span> hr </span>'
224		    + '<span class="countdown-block"><span class="label">%M</span> min </span>'
225		    + '<span class="countdown-block"><span class="label">%S</span> sec</span>'));
226		});
227				
228	};
229	siteCountDown();
230
231	var siteDatePicker = function() {
232
233		if ( $('.datepicker').length > 0 ) {
234			$('.datepicker').datepicker();
235		}
236
237	};
238	siteDatePicker();
239
240});
241

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.