PageSourceSearch

https://ravoke.com/wp-content/themes/vibenews/assets/js/scripts.js?ver=1.0

js ravoke.com collected 2026-09-25 20:50:58 UTC 5,261 bytes, 186 lines download raw bytes

1(function($) {
2    "use strict";
3	
4	
5		/* ----------------------------------------------------------- */
6		/*  Back to top
7		/* ----------------------------------------------------------- */
8
9		$(window).scroll(function () {
10			if ($(this).scrollTop() > 300) {
11				 $('.backto').fadeIn();
12			} else {
13				 $('.backto').fadeOut();
14			}
15		});
16		
17		
18		// scroll body to 0px on click
19		$('.backto').on('click', function () {
20			 $('.backto').tooltip('hide');
21			 $('body,html').animate({
22				  scrollTop: 0
23			 }, 800);
24			 return false;
25		});
26		
27		$('.backto').tooltip('hide');
28		
29
30		//Hide Loading Box (Preloader)
31		function handlePreloader() {
32			if($('.theme-loader-wrap').length){
33				$('.theme-loader-wrap').delay(1000).fadeOut(500);
34			}
35		}
36
37		if ($(".preloader-close").length) {
38			$(".preloader-close").on("click", function(){
39				$('.theme-loader-wrap').delay(200).fadeOut(500);
40			})
41		}
42			
43		
44	
45	   /* ==========================================================================
46	   When document is loaded, do
47	   ========================================================================== */
48		
49		$(window).on('load', function() {
50			handlePreloader();
51		});
52	
53	
54		
55		$('.lv-header-bar-1 .panel-bar-box, .lv-header-bar-2 a').on('click', function() {
56			$('.overlay').addClass('visible-overlay');
57			$('.vibenews-custom-panel-menu-wrapper').addClass('header-sidebar-visible');
58		});
59		
60		$('.vibenews-custom-panel-box-effect .vibenews-custom-panel-close, .overlay').on('click', function() {
61			$('.overlay').removeClass('visible-overlay');
62			$('.vibenews-custom-panel-menu-wrapper').removeClass('header-sidebar-visible');
63		});
64	
65	
66		 /* ========== Popup Search Box ========== */
67		 
68		$(function () {
69			$('#theme-serach-box_Inner').removeClass('toggled');
70
71			$('.theme-search-custom-iconn').on('click', function (e) {
72				e.stopPropagation();
73				$('#theme-serach-box_Inner').toggleClass('toggled');
74				$("#popup-search").focus();
75			});
76
77			$('#theme-serach-box_Inner input').on('click', function (e) {
78				e.stopPropagation();
79			});
80
81			$('#theme-serach-box_Inner, body').on('click', function () {
82				$('#theme-serach-box_Inner').removeClass('toggled');
83			});
84		});
85	
86	
87		jQuery('.mainmenu ul.theme-main-menu').slicknav({
88            allowParentLinks: true,
89			prependTo: '.vibenews-responsive-menu',
90			closedSymbol: "&#8594",
91			openedSymbol: "&#8595",
92        });
93		
94		jQuery('.vibenews-amp-header-wrapper .mainmenu ul.theme-main-menu').slicknav({
95            allowParentLinks: true,
96			prependTo: '.vibenews-responsive-menu',
97			closedSymbol: "&#8594",
98			openedSymbol: "&#8595",
99        });
100	
101		
102	   /* ----------------------------------------------------------- */
103	   /*  Video popup
104	   /* ----------------------------------------------------------- */
105
106	  if ($('.video-play-btn').length > 0) {
107	   $('.video-play-btn').magnificPopup({
108		   type: 'iframe',
109		   mainClass: 'mfp-with-zoom',
110		   zoom: {
111			   enabled: true, // By default it's false, so don't forget to enable it
112
113			   duration: 300, // duration of the effect, in milliseconds
114			   easing: 'ease-in-out', // CSS transition easing function
115
116			   opener: function (openerElement) {
117				   return openerElement.is('img') ? openerElement : openerElement.find('img');
118			   }
119		   }
120	   });
121	}
122
123
124	$(document).ready(function(){    
125
126	    /**
127	    * Light & Dark Mode jQuery Toggle Using localStorage
128	    */    
129
130	    // Check for saved 'switchMode' in localStorage
131	    let switchMode = localStorage.getItem('switchMode');
132
133	    // Get selector
134	    const switchModeToggle = $(' .mode-switcher ');
135
136	    // Dark mode function
137	    const enableDarkMode = function() {
138	        // Add the class to the body
139	        $( 'body' ).addClass('likhun-dark');
140	        // Update switchMode in localStorage
141	        localStorage.setItem('switchMode', 'enabled');
142	    }
143
144	    // Light mdoe function
145	    const disableDarkMode = function() {
146	        // Remove the class from the body
147	        $( 'body' ).removeClass('likhun-dark');
148	        // Update switchMode in localStorage value
149	        localStorage.setItem('switchMode', null);
150	    }
151
152	    // If the user already visited and enabled switchMode
153	    if (switchMode === 'enabled') {
154	        enableDarkMode();
155	        // Dark icon enabled
156	        $( '.mode-icon-change' ).addClass( 'icofont-moon' );
157	        $( '.mode-icon-change' ).removeClass( 'icofont-sun-alt' );
158	    } else {
159	        // Light icon enabled
160	        $( '.mode-icon-change' ).addClass( 'icofont-sun-alt' );
161	        $( '.mode-icon-change' ).removeClass( 'icofont-moon' );
162	    }
163
164	    // When someone clicks the button
165	    switchModeToggle.on('click', function() {
166	        // Change switch icon
167	        $( '.mode-icon-change' ).toggleClass( 'icofont-sun-alt' );
168	        $( '.mode-icon-change' ).toggleClass( 'icofont-moon' );
169
170	        // get their switchMode setting
171	        switchMode = localStorage.getItem('switchMode');
172
173	        // if it not current enabled, enable it
174	        if (switchMode !== 'enabled') {
175	            enableDarkMode();              
176	        // if it has been enabled, turn it off  
177	        } else {  
178	            disableDarkMode();              
179	        }
180	    });
181
182	}); // End load document
183
184		
185					
186})(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.