PageSourceSearch

https://mamainstincts.com/wp-content/themes/hello_beauty/js/global.js?ver=1.0.0

js mamainstincts.com collected 2026-10-02 04:59:56 UTC 2,444 bytes, 114 lines download raw bytes

1jQuery(function( $ ){
2
3	if( $( document ).scrollTop() > 0 ){
4		$( '.site-header' ).addClass( 'light' );
5	}
6
7	// Add opacity class to site header
8	$( document ).on('scroll', function(){
9
10		if ( $( document ).scrollTop() > 0 ){
11			$( '.site-header' ).addClass( 'light' );
12
13		} else {
14			$( '.site-header' ).removeClass( 'light' );
15		}
16
17	});
18
19	jQuery(function( $ ){
20
21		$('#main-nav-search-link').click(function(){
22			$('.search-div').show('slow');
23		});
24
25		$("*", document.body).click(function(event){
26			// event.stopPropagation();
27			var el = $(event.target);
28			var gsfrm = $(el).closest('form');
29			if(el.attr('id') !='main-nav-search-link' && el.attr('role') != 'search' && gsfrm.attr('role') != 'search'){
30				$('.search-div').hide('slow');
31			}
32		});
33
34	});
35
36
37	jQuery(function($) {
38
39		// Set side container height
40		var windowHeight = $(window).height();
41
42		$( '.side-container' ).css({
43			'height': windowHeight + 'px'
44		});
45
46		$(window).resize(function() {
47
48			var windowHeight = $(window).height();
49
50			$( '.side-container' ).css({
51				'height': windowHeight + 'px'
52			});
53	});
54
55		// Set side content variables
56		var body = $( 'body' ),
57			content = $( '.side-content' ),
58			sOpen = false;
59
60		// Toggle the side content widget area
61		$(document).ready(function() {
62
63			$( '.side-content-toggle' ).click(function() {
64				__togglesideContent();
65			});
66
67		});
68
69		function __togglesideContent() {
70
71			if (sOpen) {
72				content.fadeOut();
73				body.toggleClass( 'no-scroll' );
74				sOpen = false;
75			} else {
76				content.fadeIn();
77				body.toggleClass( 'no-scroll' );
78				sOpen = true;
79			}
80
81		}
82
83	});
84	});
85
86
87	jQuery(document).ready(function($){
88	// Scroll (in pixels) after which the "To Top" link is shown
89	var offset = 300,
90		//Scroll (in pixels) after which the "back to top" link opacity is reduced
91		offset_opacity = 1200,
92		//Duration of the top scrolling animation (in ms)
93		scroll_top_duration = 700,
94		//Get the "To Top" link
95		$back_to_top = $('.to-top');
96
97	//Visible or not "To Top" link
98	$(window).scroll(function(){
99		( $(this).scrollTop() > offset ) ? $back_to_top.addClass('top-is-visible') : $back_to_top.removeClass('top-is-visible top-fade-out');
100		if( $(this).scrollTop() > offset_opacity ) {
101			$back_to_top.addClass('top-fade-out');
102		}
103	});
104
105	//Smoothy scroll to top
106	$back_to_top.on('click', function(event){
107		event.preventDefault();
108		$('body,html').animate({
109			scrollTop: 0 ,
110		 	}, scroll_top_duration
111		);
112	});
113
114});

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.