PageSourceSearch

https://www.drummersresource.com/wp-content/themes/drummersresource/js/script.js

js drummersresource.com collected 2026-09-24 20:06:05 UTC 4,378 bytes, 144 lines download raw bytes

1$(window).on("load", function() {
2    "use strict";
3
4
5    // MUSIC PLAYER CONTROLS 
6  	$(".open-music-player").on("click", function() {
7  		$(".beatx-playyer.fixed-player").addClass("show");
8  		$(this).toggleClass("playy");
9        return false;
10  	});
11
12  	$(".remove-music-player").on("click", function() {
13  		$(".beatx-playyer").removeClass("show");
14      	$(".remove-music-player.v2").addClass("show");
15      	return false;
16  	});    
17
18   $(".remove-music-player.v2").on("click", function() {
19      	$(".beatx-playyer.fixed-player").addClass("show");
20   });
21
22   $(".jp-play").on("click", function() {
23   		$(".open-music-player").toggleClass("playy");
24   });
25
26   // RESPONSIVE MOBILE MENU
27
28    $(".menu-btn").on("click", function(){
29      $(".responsive-mobile-menu").toggleClass("active");
30      return false;
31    });
32
33    $(".close-menu, html").on("click", function(){
34      $(".responsive-mobile-menu").removeClass("active");
35    });
36
37    $(".responsive-mobile-menu ul ul").parent().addClass("menu-item-has-children");
38    $(".responsive-mobile-menu ul li.menu-item-has-children > a").on("click", function() {
39      $(this).parent().toggleClass("active").siblings().removeClass("active");
40      $(this).next("ul").slideToggle();
41      $(this).parent().siblings().find("ul").slideUp();
42      return false;
43    });
44
45    $(".close-menu, .responsive-mobile-menu").on("click", function(e) {
46      e.stopPropagation();
47    });
48
49    // SIDE PANEL SETTINGS 
50
51    $(".side-panel-sec > a").on("click", function() {
52        $(this).parent().toggleClass('active');
53        return false;
54    });
55
56    $(".rtl-btn").on("click", function() {
57      $("body").toggleClass("rtl");
58    });
59
60    $(".ltr-btn").on("click", function() {
61      $("body").removeClass("rtl");
62    });
63
64    // DEFAULT THEME BUTTON ANIMATION
65    
66    if ($('.btn-default').length) {
67      $('.btn-default').on('mouseenter', function(e) {
68        var parentOffset = $(this).offset(),
69        relX = e.pageX - parentOffset.left,
70        relY = e.pageY - parentOffset.top;
71        $(this).find('span').css({top:relY, left:relX})}).on('mouseout', function(e) {
72        var parentOffset = $(this).offset(),
73        relX = e.pageX - parentOffset.left,
74        relY = e.pageY - parentOffset.top;
75        $(this).find('span').css({top:relY, left:relX})
76      });
77    };
78
79    // AJAX CONTACT FORM SCRIPT (WORKING CONTACT FORM)
80
81    if($('#contact-form').length){
82      $('#submit').on("click", function(){
83        var o = new Object();
84        var form = '#contact-form';
85        var name = $('#contact-form .name').val();
86        var email = $('#contact-form .email').val();
87        if(name == '' || email == '') {
88          $('#contact-form .response').html('<div class="failed">Please fill the required fields.</div>');
89          return false;
90        }
91        $.ajax({
92            url:"sendmail.php",
93            method:"POST",
94            data: $(form).serialize(),
95            beforeSend:function(){
96                $('#contact-form .response').html('<div class="text-info"><img src="images/preloader.gif"> Loading...</div>');
97            },
98            success:function(data){
99                $('form').trigger("reset");
100                $('#contact-form .response').fadeIn().html(data);
101                setTimeout(function(){
102                    $('#contact-form .response').fadeOut("slow");
103                }, 5000);
104            },
105            error:function(){
106                $('#contact-form .response').fadeIn().html(data);
107            }
108        });
109      });
110    };
111
112
113
114
115    // ADDING SMOOTH SCROLLING TO LINK
116
117    $(".banner-text .btn-default.demos").on('click', function(event) {
118
119      // Make sure this.hash has a value before overriding default behavior
120      if (this.hash !== "") {
121        // Prevent default anchor click behavior
122        event.preventDefault();
123
124        // Store hash
125        var hash = this.hash;
126
127        // Using jQuery's animate() method to add smooth page scroll
128        // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
129        $('html, body').animate({
130          scrollTop: $(hash).offset().top
131        }, 800, function(){
132     
133          // Add hash (#) to URL when done scrolling (default click behavior)
134          window.location.hash = hash;
135        });
136      } // End if
137    });
138
139    // END ================
140
141});
142
143
144

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.