From 32678bbb845bb4bd779feaa7d21b4a5e85bce6b8 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 28 Dec 2021 07:46:35 +0000 Subject: [PATCH] fix error --- modules/text_marquee/_widget.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/text_marquee/_widget.html.erb b/modules/text_marquee/_widget.html.erb index 46b61ad..f4ca0fd 100644 --- a/modules/text_marquee/_widget.html.erb +++ b/modules/text_marquee/_widget.html.erb @@ -16,8 +16,8 @@ current_text = (current_text > total_texts ? 0 : current_text); last_text = (current_text == 0 ? total_texts : current_text - 1); speed = main_div.find("ul li").eq(current_text).find("> a").eq(0).attr('speed'); - main_div.find("ul li").eq(last_text).slideUp({duration: 500, queue: true}); - main_div.find("ul li").eq(current_text).slideDown({duration: 500, queue: true}); + main_div.find("ul li").eq(last_text).stop(true, true).slideUp({duration: 500, queue: true}); + main_div.find("ul li").eq(current_text).stop(true, true).slideDown({duration: 500, queue: true}); current_text++; if(total_texts > 0){ if(window["{{subpart-id}}_time_out_id"]) @@ -28,4 +28,4 @@ } textTransform(); })(); - \ No newline at end of file +