first commit
This commit is contained in:
56
wp-content/plugins/elementor-addon/assets/js/main.js
Normal file
56
wp-content/plugins/elementor-addon/assets/js/main.js
Normal file
@@ -0,0 +1,56 @@
|
||||
jQuery(function($) {
|
||||
if($('#scroll-up-box').length) {
|
||||
$(window).scroll(function() {
|
||||
if ($(this).scrollTop() > 200) {
|
||||
$('#scroll-up-box').addClass('visible');
|
||||
} else {
|
||||
$('#scroll-up-box').removeClass('visible');
|
||||
}
|
||||
});
|
||||
|
||||
$('body').on('click', '#scroll-up-box', function() {
|
||||
$('html, body').animate({
|
||||
scrollTop: 0
|
||||
}, 500);
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
jQuery(function($) {
|
||||
$('body').on('click', '.category-nav-tree .parent-arrow', function() {
|
||||
$(this).toggleClass('active');
|
||||
$(this).parent().siblings('ul').slideToggle();
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
jQuery(function($) {
|
||||
if($('#audio-box').length) {
|
||||
var audioPlayer = $('#audio-player');
|
||||
var audioActive = $('.audio-active');
|
||||
var audioInactive = $('.audio-inactive');
|
||||
|
||||
$('body').on('click', '#audio-handler span', function() {
|
||||
if (audioPlayer[0].paused) {
|
||||
audioPlayer[0].play();
|
||||
|
||||
audioActive.addClass('active');
|
||||
audioInactive.removeClass('active');
|
||||
} else {
|
||||
audioPlayer[0].pause();
|
||||
|
||||
audioActive.removeClass('active');
|
||||
audioInactive.addClass('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
jQuery(function($) {
|
||||
if($('#language_box').length) {
|
||||
$('body').on('click', '#language_box .current-lang', function() {
|
||||
$('#language_box .lang-list').toggleClass('active').slideToggle();
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user