HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/s/l/y/slyfwmm/pianob/wp-content/themes/zk-monaco/inc/megamenu/js/set_background.js
(function ($) {
    "use strict"; 
	jQuery(document).ready(function ($) {
		if ($('.set_custom_images').length > 0) {
			if (typeof wp !== 'undefined' && wp.media && wp.media.editor) {
				$('.wrap').on('click', '.set_custom_images', function (e) {
					e.preventDefault();
					var input_text = $('#' + (this.id).substring(7));
					wp.media.editor.send.attachment = function (props, attachment) {
						input_text.val(attachment.url);
					};
					wp.media.editor.open(input_text);
					return false;
				});
			}
		}
		jQuery('.menu_icon_wrap').each(function(){
			var _this = $(this);
			var $item_id = _this.attr('data-item_id');
			jQuery("li",_this).click(function() {
				jQuery(this).attr("class","selected").siblings().removeAttr("class");
				var icon = jQuery(this).attr("data-icon");
				jQuery("#edit-menu-item-menu_icon-"+ $item_id ).val(icon);
				jQuery(".icon-preview-"+ $item_id).html("<i class=\'icon fa fa-"+icon+"\'></i>");
			});
		})
		jQuery('.btn_clear').click(function(){
			$(this).parent().find('.menu-item-bg_image,.menu-item-menu_icon').val('');
			$(this).parent().find('.icon-preview').html('');
		})
		jQuery('.menu-item-submenu_type').change(function(){
			var el = jQuery(this);
			var el_value 	= el.val();
			var el_id 		= el.attr('id');
			var menu_id 	= 'menu-item-'+el_id.substring(36);
			if( el_value == 'widget_area' ) {
				jQuery("#"+menu_id+" .el_multicolumn").hide();
				jQuery("#"+menu_id+" .el_widget_area").show();
			}else if( el_value == 'multicolumn' ){
				jQuery("#"+menu_id+" .el_widget_area").hide();
				jQuery("#"+menu_id+" .el_multicolumn").show();
			}else if( el_value == 'standard' ){
				jQuery("#"+menu_id+" .el_widget_area").hide();
				jQuery("#"+menu_id+" .el_multicolumn").hide();
			}
		})
	});  
}(jQuery));