Current path: home/webdevt/www/schtroumpf.fr/modules/an_homeslider/views/js/
?? Go up: /home/webdevt/www/schtroumpf.fr/modules/an_homeslider/views
/**
* 2022 Anvanto
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* @author Anvanto <anvantoco@gmail.com>
* @copyright 2022 Anvanto
* @license Valid for 1 website (or project) for each purchase of license
* International Registered Trademark & Property of Anvanto
*/
(function ($, window, undefined) {
'use strict';
function showHideFields(){
var viewType = $('.an-hp-block-type input:checked').val();
$('.js-hp-block-categories').hide();
$('.js-hp-block-category').hide();
$('.js-hp-block-show_sub_cat').hide();
$('.js-hp-block-show_sort').show();
if (viewType == 'categories'){
$('.js-hp-block-categories').show();
$('.js-hp-block-show_sort').hide();
}
if (viewType == 'category'){
$('.js-hp-block-category').show();
$('.js-hp-block-show_sub_cat').show();
}
if (viewType == 'best-sales'){
$('.js-hp-block-show_sort').hide();
}
if (viewType == 'products'){
$('.js-hp-block-show_sort').hide();
}
}
$(document).ready(function () {
showHideFields();
$('.an-hp-block-type input').on('click', function(){
showHideFields();
});
});
})(jQuery, window);