Make WordPress Core

Ticket #24767: 24767.3.diff

File 24767.3.diff, 1.3 KB (added by purzlbaum, 11 years ago)

Fix for twentytwelve theme

  • src/wp-content/themes/twentythirteen/style.css

    diff --git src/wp-content/themes/twentythirteen/style.css src/wp-content/themes/twentythirteen/style.css
    index 28df920..3cde0df 100644
    footer.entry-meta { 
    28952895                color: #141412;
    28962896        }
    28972897
    2898         .toggled-on .nav-menu li a:hover,
    2899         .toggled-on .nav-menu ul a:hover {
     2898        .toggled-on .nav-menu > li a:hover,
     2899        .toggled-on .nav-menu > ul a:hover {
    29002900                background-color: #db572f;
    29012901                color: #fff;
    29022902        }
  • src/wp-content/themes/twentytwelve/js/navigation.js

    diff --git src/wp-content/themes/twentytwelve/js/navigation.js src/wp-content/themes/twentytwelve/js/navigation.js
    index 2c32141..383077a 100644
     
    4040        $( '.main-navigation' ).find( 'a' ).on( 'focus.twentytwelve blur.twentytwelve', function() {
    4141                $( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' );
    4242        } );
     43
     44  if ( 'ontouchstart' in window ) {
     45    $( '.menu-item-has-children > a' ).on( 'touchstart.twentytwelve', function( e ) {
     46      var el = $( this ).parent( 'li' );
     47
     48      if ( ! el.hasClass( 'focus' ) ) {
     49        e.preventDefault();
     50        el.toggleClass( 'focus' );
     51        el.siblings( '.focus').removeClass( 'focus' );
     52      }
     53    } );
     54  }
    4355} )( jQuery );