first commit
This commit is contained in:
42
wp-content/themes/aac/js/custom.js
Normal file
42
wp-content/themes/aac/js/custom.js
Normal file
@@ -0,0 +1,42 @@
|
||||
jQuery(function ($) {
|
||||
$('body').on('click', '.c-tabs .c-tabs--nav li', function (e) {
|
||||
e.preventDefault()
|
||||
|
||||
let tabId = $(this).attr('tab_id')
|
||||
|
||||
$(this)
|
||||
.closest('.c-tabs')
|
||||
.find('.c-tabs--nav li')
|
||||
.not(this)
|
||||
.removeClass('active')
|
||||
$(this).addClass('active')
|
||||
|
||||
$(this)
|
||||
.closest('.c-tabs')
|
||||
.find('.c-tabs--content [tab_id]')
|
||||
.not('[tab_id=' + tabId + ']')
|
||||
.hide()
|
||||
$(this)
|
||||
.closest('.c-tabs')
|
||||
.find('.c-tabs--content [tab_id=' + $(this).attr('tab_id') + ']')
|
||||
.show()
|
||||
})
|
||||
$('.c-tabs .c-tabs--nav li:first-child').trigger('click')
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
$('body').on(
|
||||
'click',
|
||||
'.modules-tiles .module-tile .module-tile--btn',
|
||||
function (e) {
|
||||
e.preventDefault()
|
||||
|
||||
let $tile = $(this).closest('.module-tile')
|
||||
$tile.toggleClass('active')
|
||||
$(this).toggleClass('active')
|
||||
$('.module-tile--content', $tile).slideToggle()
|
||||
$('.text-more', this).toggle()
|
||||
$('.text-less', this).toggle()
|
||||
}
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user