From 588ef908aa67c7ee86c7a6b2e0c518ae2cc4b88a Mon Sep 17 00:00:00 2001 From: gregory-p Date: Wed, 20 Mar 2019 10:13:28 +0300 Subject: [PATCH] LAW-2619 --- .../themes/lawcarta/assets/js/promoImage.js | 17 +++++++++++++++++ htdocs/wp-content/themes/lawcarta/footer.php | 1 + .../themes/livecarta/assets/js/faqSearch.js | 5 ----- 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 htdocs/wp-content/themes/lawcarta/assets/js/promoImage.js delete mode 100644 htdocs/wp-content/themes/livecarta/assets/js/faqSearch.js diff --git a/htdocs/wp-content/themes/lawcarta/assets/js/promoImage.js b/htdocs/wp-content/themes/lawcarta/assets/js/promoImage.js new file mode 100644 index 0000000..620f0a1 --- /dev/null +++ b/htdocs/wp-content/themes/lawcarta/assets/js/promoImage.js @@ -0,0 +1,17 @@ +$(document).ready(function () { + function promoTopNext() { + if ($('.promo-backs').length) { + setTimeout(function () { + var current = $('.promo-bg.current'); + current.removeClass('current'); + if (current.next().length) { + current.next().addClass('current'); + } else { + current.parent().find('.promo-bg:first-child').addClass('current'); + } + promoTopNext(); + }, 4500); + } + }; + promoTopNext(); +}); \ No newline at end of file diff --git a/htdocs/wp-content/themes/lawcarta/footer.php b/htdocs/wp-content/themes/lawcarta/footer.php index 72c5f65..4b62381 100644 --- a/htdocs/wp-content/themes/lawcarta/footer.php +++ b/htdocs/wp-content/themes/lawcarta/footer.php @@ -74,6 +74,7 @@ require_once 'inc/walker-nav-menu.php'; + \ No newline at end of file diff --git a/htdocs/wp-content/themes/livecarta/assets/js/faqSearch.js b/htdocs/wp-content/themes/livecarta/assets/js/faqSearch.js deleted file mode 100644 index 4976296..0000000 --- a/htdocs/wp-content/themes/livecarta/assets/js/faqSearch.js +++ /dev/null @@ -1,5 +0,0 @@ -document.addEventListener("DOMContentLoaded", function(event) { - $('.start-search').on('click', function(){ - $('#search-form').submit(); - }); -}) \ No newline at end of file