tabs jquery

$('.card-menu'). on('click', '.card-menu__item:not(.js-card-active)', function(event) { event.preventDefault(); // tabs menu changeŠ² class var $this = $(this); $this.addClass('js-card-active') .siblings() .removeClass('js-card-active'); // tabs content changeŠ² class $this.parents('.card') .find('.tabs-content') .removeClass('js-card-active') .eq($this.index()) .addClass('js-card-active'); });
tabs jquery

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.