Advertisement
bongzilla

Untitled

Oct 12th, 2021
1,169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.   var Webflow = Webflow || [];
  3.   Webflow.push(function() {
  4.  
  5.     $('.h-wrap_tab').on('click', '.b-tabs__arrow, .b-tabs__arrow-up', function() {
  6.       let direction = $(this).hasClass('b-tabs__arrow') ? 1 : -1;
  7.  
  8.       let tablinks = $(this).parent().find('.w-tab-menu');
  9.  
  10.       let index = tablinks.find('.w--current').index() + direction;
  11.  
  12.       index = index >= tablinks.children().length ? 0 : index;
  13.       tablinks.find('.w-tab-link').eq(index).trigger('click');
  14.     });
  15.   });
  16. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement