jQuery(document).ready(function ($) {
(function() {
'use strict';
if($('.c-tabs-nav__link').length){
var tabs = function(options) {
var el = document.querySelector(options.el);
var tabNavigationLinks = el.querySelectorAll(options.tabNavigationLinks);
var tabContentContainers = el.querySelectorAll(options.tabContentContainers);
var activeIndex = 0;
var initCalled = false;
var init = function() {
if (!initCalled) {
initCalled = true;
el.classList.remove('no-js');
for (var i = 0; i < tabNavigationLinks.length; i++) {
var link = tabNavigationLinks[i];
handleClick(link, i);
}
}
};
var handleClick = function(link, index) {
};
$('body').on('click', '.c-tabs-nav__link', function (e) {
e.preventDefault();
var index = $(this).index('.c-tabs-nav__link');
$('.c-tabs-nav__link').removeClass('is-active');
$(this).addClass('is-active');
$('.c-tab').removeClass('is-active');
$('.c-tab').eq(index).addClass('is-active');
});
var goToTab = function(index) {
if (index !== activeIndex && index >= 0 && index <= tabNavigationLinks.length) {
tabNavigationLinks[activeIndex].classList.remove('is-active');
tabNavigationLinks[index].classList.add('is-active');
tabContentContainers[activeIndex].classList.remove('is-active');
tabContentContainers[index].classList.add('is-active');
activeIndex = index;
}
};
return {
init: init,
goToTab: goToTab
};
};
window.tabs = tabs;
var myTabs = tabs({
el: '#tabs',
tabNavigationLinks: '.c-tabs-nav__link',
tabContentContainers: '.c-tab'
});
myTabs.init();
var type = 0;
var id = $('.c-tabs-nav__link').size() + 1;
var shortcode = "[shortcode_arbitrage id='" + id + "' type='" + type + "']";
$('.add').click(function (e) {
var txt ='input[name="0"]';
var text = $(txt).val();
shortcode = "[shortcode_arbitrage id='" + id + "' type='" + type + "']";
var template = '' +
'Mirror'+
'
Choose width of the arbitrage table.
Choose height of the arbitrage table.
Copy short code and paste it on any page or post, where you\'d like the widget to be displayed.
Copy widget ID and paste it inside the widget.