Q&A よくある質問 Copy

Q&Aカテゴリ別一覧

店舗

予約

不動産購入

不動産売却

jQuery(function(){
var toggleMenu = {
factorSelector : ‘.js-toggleMenu’,
triggerSelector : ‘.js-toggleMenu-trigger’,
stateClass : ‘is-toggleMenu–show’
}
jQuery(toggleMenu.triggerSelector).on(‘click’, function(){
var $this = jQuery(this);
var $parents = $this.parents(toggleMenu.factorSelector);
var state = $this.attr(‘aria-expanded’);
var $targetElm = jQuery(`#${$this.attr(‘aria-controls’)}`)
if(state === ‘true’) {
$this.attr(‘aria-expanded’, ‘false’);
$targetElm.attr(‘aria-hidden’, ‘true’).stop().slideUp();
$parents.removeClass(toggleMenu.stateClass);
} else {
$this.attr(‘aria-expanded’, ‘true’);
$targetElm.attr(‘aria-hidden’, ‘false’).stop().slideDown();
$parents.addClass(toggleMenu.stateClass);
}
});
});

PAGE TOP