From 7804a3e7490be285848933d7084a8d699647dd14 Mon Sep 17 00:00:00 2001 From: chihyux Date: Tue, 28 Jul 2020 23:46:15 +0800 Subject: [PATCH] fix annc_widget15 --- modules/announcement/_annc_widget15.html.erb | 123 +++++-------------- 1 file changed, 28 insertions(+), 95 deletions(-) diff --git a/modules/announcement/_annc_widget15.html.erb b/modules/announcement/_annc_widget15.html.erb index 5d6b453..1880153 100644 --- a/modules/announcement/_annc_widget15.html.erb +++ b/modules/announcement/_annc_widget15.html.erb @@ -3,14 +3,13 @@

{{widget-title}}

- <%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %> -
+
-
+ <%= (I18n.locale.to_s =="zh_tw") ? "Read More" : "More NEWS" %> - +$('.owl-carousel').owlCarousel({ + loop:true, + margin:10, + responsiveClass:true, + items:3, + responsive:{ + 0:{ + items:1, + nav:true + }, + 580:{ + items:3, + nav:false + }, + } +}) + +$('.btn-right').click(function() { + $(this).parent().siblings('.owl-carousel').trigger('next.owl.carousel', [300]); +}) +$('.btn-left').click(function() { + $(this).parent().siblings('.owl-carousel').trigger('prev.owl.carousel', [300]); +}) + \ No newline at end of file