| Server IP : 213.186.33.4 / Your IP : 216.73.216.146 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www2/wp-content/themes/novablog/includes/main-menu/admin/js/ |
Upload File : |
jQuery(function($){
/* function to call when menu item is added to the menu */
function add_item_callback() {
$( '.spinner', '#novablog-widget-section' ).fadeOut(function(){
$(this).remove();
});
}
$( '#novablog-widget-menu-submit' ).click(function(){
var selected = $('#novablog-menu-widgets :checked'),
$button = $( this );
if( selected.length > 0 ) {
$( '<span class="spinner" style="visibility: visible; display: inline-block;"></span>' ).insertBefore( $button );
/* add menu item to the menu */
wpNavMenu.addLinkToMenu( '#' + selected.val(), selected.text(), null, add_item_callback );
}
});
$( '#update-nav-menu' )
/* customize menu item edit screen for widget menu items */
.on('click', '.item-edit', function(){
var item = $(this).closest( 'li.menu-item-custom' );
if( item.length < 1 ) return;
if( item.find( '.novablog-widget-options' ).length > 0 ) { // widget type
item.find( '.novablog-widget-options' ).prevAll().hide();
/* for top-level menu items, show the Title field */
if( item.hasClass( 'menu-item-depth-0' ) ) {
item.find( '.edit-menu-item-title' ).closest( 'p' ).show();
}
}
});
/* show and hide Dropdown Width option based on Mega Menu selection */
$( 'body' ).on( 'change', '.novablog_field_db-mega', function(){
if( $( this ).val() == '' ) {
$( this ).closest( '.menu-item' ).find( '.db-dropdown-columns-field' ).show();
} else {
$( this ).closest( '.menu-item' ).find( '.db-dropdown-columns-field' ).hide();
}
} );
$( '#update-nav-menu' ).on('click', '.item-edit', function(){
$( this ).closest( '.menu-item' ).find( '.novablog_field_db-mega' ).trigger( 'change' );
});
});