WordPress.org

Plugin Directory

Changeset 969546


Ignore:
Timestamp:
08/21/14 09:16:02 (4 years ago)
Author:
peter.featherstone
Message:

Updated JS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • responsive-menu/tags/2.2/app/models/JSModel.php

    r969516 r969546  
    416416             
    417417if( !$options['RMExpand'] ) 
    418     $js .= "\$RMjQuery( '#responsive-menu .responsive-menu .sub-menu' ).css( 'display', 'none' );"; 
     418    $js .= "\$RMjQuery( '#responsive-menu ul ul' ).css( 'display', 'none' );"; 
    419419     
    420420     
     
    423423    clickLink = '{$clickLink}'; 
    424424    clickedLink = '{$clickedLink}'; 
    425  
    426     \$RMjQuery( '#responsive-menu .responsive-menu .menu-item-has-children' ).not( '.current-menu-item, .current-menu-ancestor, .current_page_ancestor' ).prepend( clickLink ); 
    427  
    428     \$RMjQuery( '#responsive-menu .responsive-menu .menu-item-has-children.current-menu-item, #responsive-menu .responsive-menu .menu-item-has-children.current_page_ancestor, #responsive-menu .responsive-menu .menu-item-has-children.current-menu-ancestor' ).prepend( clickedLink ); 
     425         
     426    excludeList = '.current-menu-item, .current-menu-ancestor, .current_page_ancestor'; 
     427         
     428    \$RMjQuery( '#responsive-menu .responsive-menu .menu-item-has-children' ).not( excludeList ).prepend( clickLink ); 
     429    \$RMjQuery( '#responsive-menu .responsive-menu .page_item_has_children' ).not( excludeList ).prepend( clickLink ); 
     430 
     431    \$RMjQuery( '#responsive-menu .responsive-menu .page_item_has_children.current-menu-item' ).prepend( clickedLink );   
     432    \$RMjQuery( '#responsive-menu .responsive-menu .page_item_has_children.current_page_ancestor' ).prepend( clickedLink ); 
     433    \$RMjQuery( '#responsive-menu .responsive-menu .page_item_has_children.current-menu-ancestor' ).prepend( clickedLink ); 
     434     
     435    \$RMjQuery( '#responsive-menu .responsive-menu .menu-item-has-children.current-menu-item' ).prepend( clickedLink );  
     436    \$RMjQuery( '#responsive-menu .responsive-menu .menu-item-has-children.current_page_ancestor' ).prepend( clickedLink );  
     437    \$RMjQuery( '#responsive-menu .responsive-menu .menu-item-has-children.current-menu-ancestor').prepend( clickedLink ); 
    429438 
    430439"; 
     
    443452    \$RMjQuery( '.appendLink' ).on( 'click', function() {  
    444453 
    445         \$RMjQuery( this ).nextAll( 'ul.sub-menu' ).slideToggle();  
     454        \$RMjQuery( this ).nextAll( '#responsive-menu ul ul' ).slideToggle();  
    446455 
    447456        \$RMjQuery( this ).html( \$RMjQuery( this ).html() == '\u25B2' ? '▼' : '▲' ); 
     
    453462    \$RMjQuery( '.rm-click-disabled' ).on( 'click', function() {  
    454463 
    455         \$RMjQuery( this ).nextAll( 'ul.sub-menu' ).slideToggle();  
     464        \$RMjQuery( this ).nextAll( '#responsive-menu ul ul' ).slideToggle();  
    456465 
    457466        \$RMjQuery( this ).siblings( '.appendLink' ).html( \$RMjQuery( this ).siblings( '.appendLink' ).html() == '\u25B2' ? '▼' : '▲' ); 
     
    501510        \$RMjQuery( '#responsive-menu .responsive-menu .current-menu-ancestor.menu-item-has-children' ).children( 'ul' ).css( 'display', 'block' ); 
    502511        \$RMjQuery( '#responsive-menu .responsive-menu .current-menu-item.menu-item-has-children' ).children( 'ul' ).css( 'display', 'block' ); 
     512         
     513        \$RMjQuery( '#responsive-menu .responsive-menu .current_page_ancestor.page_item_has_children' ).children( 'ul' ).css( 'display', 'block' ); 
     514        \$RMjQuery( '#responsive-menu .responsive-menu .current-menu-ancestor.page_item_has_children' ).children( 'ul' ).css( 'display', 'block' ); 
     515        \$RMjQuery( '#responsive-menu .responsive-menu .current-menu-item.page_item_has_children' ).children( 'ul' ).css( 'display', 'block' ); 
    503516 
    504517    "; 
Note: See TracChangeset for help on using the changeset viewer.