This commit is contained in:
ken 2026-09-02 16:32:08 +08:00
parent 6c9a0ebde5
commit 335f98436c
2 changed files with 18 additions and 19 deletions

View File

@ -8,6 +8,10 @@
// Widget // Widget
// ## gerenral styles // ## gerenral styles
.button-mid {
margin: 0;
z-index: 201;
}
ul.button-mid{ ul.button-mid{
.prev-button{ .prev-button{
height: 2em !important; height: 2em !important;

View File

@ -29,9 +29,7 @@
</div> </div>
</div> </div>
<div class="w-ad-banner__pager-2 w-ba-banner__caption banner-pager banner_caption_{{subpart-id}}" data-list="images" data-level="0"> <ul class="w-ba-banner__pager-2 banner-pager banner_caption_{{subpart-id}}"></ul>
<li><button title="Slide {{slide_number}}" aria-label="Pager"><span style="display: none;">Slide {{slide_number}}</span></button></li>
</div>
<ul class="controlplay" role="radiogroup" aria-label="播放控制選項"> <ul class="controlplay" role="radiogroup" aria-label="播放控制選項">
<a role="radio" aria-checked="true" href="javascript:;" class="resume-slide active" title="繼續播放" aria-label="繼續播放" aria-live="assertive"> <a role="radio" aria-checked="true" href="javascript:;" class="resume-slide active" title="繼續播放" aria-label="繼續播放" aria-live="assertive">
<i aria-hidden="true"></i> <i aria-hidden="true"></i>
@ -49,23 +47,20 @@
</ul> </ul>
</div> </div>
<script> <script>
$('[data-subpart-id="{{subpart-id}}"] .pause-slide').click(function(){ var flag = 1;
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause'); $('.pause-slide').click(function(){
$(this).addClass('active') $(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('pause');
$(this).parents('.controlplay').eq(0).find('.resume-slide').removeClass('active') });
}); $('.resume-slide').click(function(){
$('[data-subpart-id="{{subpart-id}}"] .resume-slide').click(function(){ $(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('resume');
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle('resume'); });
$(this).addClass('active') $('.next-button').off('click').on('click',function(){
$(this).parents('.controlplay').eq(0).find('.pause-slide').removeClass('active') $(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("next");
});
$('[data-subpart-id="{{subpart-id}}"] .next-button').click(function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("next");
}) })
$('[data-subpart-id="{{subpart-id}}"] .prev-button').click(function(){ $('.prev-button').off('click').on('click',function(){
$(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev"); $(this).parent("ul").parent('.w-ba-banner').find(".cycle-slideshow").cycle("prev");
}); });
/* 修正點:處理 Pager 無障礙朗讀文字 */ /* 修正點:處理 Pager 無障礙朗讀文字 */
$('.cycle-slideshow').on('cycle-post-initialize', function(event, optionHash) { $('.cycle-slideshow').on('cycle-post-initialize', function(event, optionHash) {
var $container = $(this).closest('.w-ba-banner'); var $container = $(this).closest('.w-ba-banner');