56 lines
1.5 KiB
JavaScript
56 lines
1.5 KiB
JavaScript
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();
|
|
})
|
|
}
|
|
}) |