Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /home/claqxcrl/confenda.com/wp-content/themes/beevent/functions/metacore/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/claqxcrl/confenda.com/wp-content/themes/beevent/functions/metacore/assets/js/core.options.js
jQuery(document).ready(function($) {
	"use strict";
	var blog_tab = $('.EasyTabs');
	if(blog_tab.length > 0){
		blog_tab.easytabs();
	}
	
	$('.select-field select').each(function(e) {
		"use strict";
		var follow = $(this).attr('data-follow');
		XOptionsFollow($(this), follow);
	});

	/** switch */
	$('.switch-field').each(function(e) {
		"use strict";
		var _switch = $(this).find('input');
		var follow = $(this).attr('data-follow');
		XOptionsFollow(_switch, follow);
	});
	$(document.body).on('click', '.switch-field', function(e) {
		"use strict";
		var _switch = $(this).find('input');
		//check follow ids
		var follow = $(this).attr('data-follow');
		var on = $(this).attr('data-on');
		var off = $(this).attr('data-off');
		//switch actions
		if (_switch.val() == off) {
			_switch.val(on);
			$(this).removeClass('off').addClass('on');
		} else {
			_switch.val(off);
			$(this).removeClass('on').addClass('off');
		}
		XOptionsFollow(_switch, follow);
		return;
	});
	
	/* image select */
	$(document.body).on('click', '.image-field ul li', function(e) {
		var value = $(this).attr('data-value');
		$(this).parent().find('li.active').removeClass('active');
		$(this).addClass('active');
		$(this).parents('.image-field').find('input').val(value);
	});
	/* show or hide elements */
	function XOptionsFollow(element, data) {
		"use strict";
		if (data != undefined) {
			data = jQuery.parseJSON(decodeURIComponent(data));
			var active = [];
			if (jQuery.isPlainObject(data)) {
				jQuery.each(data, function(index) {
					"use strict";
					if (element.val() == index) {
						active = data[index];
						jQuery.each(data[index], function(_index) {
							"use strict";
							jQuery('' + data[index][_index] + '').css({
								display : 'block'
							});
						});
					} else {
						jQuery.each(data[index], function(_index) {
							"use strict";
							var off = data[index][_index];
							if (jQuery.inArray(off, active) != 1) {
								jQuery('' + off + '').css({
									display : 'none'
								});
							}
						});
					}
				})
			}
		}
	}
});

ZeroDay Forums Mini