PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/eastfin/wp-content/themes/kingdom/modules/sidebars_per_sections/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/eastfin/wp-content/themes/kingdom/modules/sidebars_per_sections/app.class.js

/*
Document   :  kingdomSidebarsPerPages
Author     :  FG http://themeforest.net/user/FG
*/
// Initialization and events code for the app
kingdomSidebarsPerPages = (function ($) {
    "use strict";

    // public
    var debug_level = 0;
    var maincontainer = null;

	// init function, autoload
	(function init() {
		// load the triggers
		$(document).ready(function(){
			maincontainer = $(".kingdom-panel");
			triggers();
		});
	})();
	
	function changeToPanel( elm )
	{
		var section = elm.data('section'),
			section_obj = $("#kingdom-panel-" + section);
		
		$(".kingdom-panel-sections-choose").hide();
		
		section_obj.show();
		
		
		$('#kingdom-sections-choose a.on').removeClass('on');
		elm.addClass('on');
	}
	
	function saveThePanel( elm )
	{
		elm.find("#kingdom-status-box").fadeIn('fast');
	}
	
	function triggers()
	{
		maincontainer.on('click', '#kingdom-sections-choose a', function(e) {
			e.preventDefault();
			changeToPanel( $(this) );
		});
		
		// click on first element
		$('#kingdom-sections-choose a').eq(0).click();
		
		maincontainer.on('submit', '#kingdom_sidebars_per_sections', function(e) {
			e.preventDefault();
			
			saveThePanel( $(this) );
		});
	}

	// external usage
	return {}
})(jQuery);