HEX
Server: LiteSpeed
System: Linux sg-cp4.cloudnetwork.vn 4.18.0-553.69.1.lve.el8.x86_64 #1 SMP Wed Aug 13 19:53:59 UTC 2025 x86_64
User: thu28850 (1134)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/thu28850/www/wp-content/themes/martfury/js/plugins/jquery.tabs.js
/**
 * jQuery Tabs plugin 1.0.0
 *
 * @author Drfuri
 */
(function($) {
	$.fn.mrtabs = function() {
		return this.each(function() {
			var $element = $(this),
				$nav = $element.find('.tabs-nav'),
				$tabs = $nav.find('a'),
				$panels = $element.find('.tabs-panel');


			$tabs.filter(':first').addClass('active');
			$nav.find('li').filter(':first').addClass('active');
			$panels.filter(':first').addClass('active');

			$tabs.on('click', function(e) {
				e.preventDefault();

				var $tab = $(this),
					index = $tab.parent().index(),
					$panels = $element.find('.tabs-panel');

				if ( $tab.hasClass('active') ) {
					return;
				}

				$tabs.removeClass('active');
				$tab.addClass('active');
				$nav.find('li').removeClass('active');
				$tab.closest('li').addClass('active');
				$panels.removeClass('active');
				$panels.filter(':eq(' + index + ')').addClass('active');

                $(document.body).trigger('martfury_after_tab_clicked');

			});
		});
	};

	/* Init tabs */
	$(function() {
		$('.martfury-tabs').mrtabs();
	});
})(jQuery);