aplayer的間距調整

🐛 修復tabs外挂標簽與aplayer插件衝突而異常的bugs
This commit is contained in:
Jerry
2020-06-20 22:05:39 +08:00
Unverified
parent baa6f72d35
commit 1d293c0fc7
6 changed files with 41 additions and 44 deletions

View File

@@ -760,20 +760,19 @@ $(function () {
})
}
var $tab = $('#article-container .tabs')
$tab.find('.tab a').on('click', function (e) {
e.preventDefault()
var $this = $(this)
var $tabItem = $this.parent()
const $tab = $('#article-container .tabs')
$tab.find('.tab button').on('click', function (e) {
const $this = $(this)
const $tabItem = $this.parent()
if (!$tabItem.hasClass('active')) {
var $tacbContent = $this.parents('.nav-tabs').next()
const $tacbContent = $this.parents('.nav-tabs').next()
$tabItem.siblings('.active').removeClass('active')
$tabItem.addClass('active')
var tabId = $this.attr('href')
const tabId = $this.attr('data-href')
$tacbContent.find('> .tab-item-content').removeClass('active')
$tacbContent.find(`> ${tabId}`).addClass('active')
var $isTabJustifiedGallery = $tacbContent.find(tabId).find('.justified-gallery')
const $isTabJustifiedGallery = $tacbContent.find(tabId).find('.justified-gallery')
if (isJustifiedGallery && $isTabJustifiedGallery.length > 0) {
initJustifiedGallery($isTabJustifiedGallery)
}