Add some delay to the favorites menu so that it is harder to accidentally open or close

git-svn-id: http://svn.automattic.com/wordpress/trunk@9049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2008-10-01 22:32:18 +00:00
parent 7bc80167fe
commit 43cb4be063
2 changed files with 4 additions and 3 deletions

View File

@ -77,7 +77,8 @@ jQuery( function($) {
$('#dashmenu li.wp-has-submenu').bind( 'mouseenter mouseleave', function() { return menuToggle( $(this).children('ul'), 'toggle' ); } ); $('#dashmenu li.wp-has-submenu').bind( 'mouseenter mouseleave', function() { return menuToggle( $(this).children('ul'), 'toggle' ); } );
$('#favorite-actions').bind( 'mouseenter mouseleave', function(){$('#favorite-action').slideToggle('fast')} ); $('#favorite-actions').bind( 'mouseenter', function(){$('#favorite-action').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-action').hasClass('slideDown') ) { $('#favorite-action').slideDown('fast') }}, 300) } );
$('#favorite-actions').bind( 'mouseleave', function(){$('#favorite-action').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-action').hasClass('slideUp') ) { $('#favorite-action').slideUp('fast') }}, 500) } );
} ); } );

View File

@ -44,7 +44,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->base_url = $guessurl; $scripts->base_url = $guessurl;
$scripts->default_version = get_bloginfo( 'version' ); $scripts->default_version = get_bloginfo( 'version' );
$scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'user-settings'), '20080905' ); $scripts->add( 'common', '/wp-admin/js/common.js', array('jquery', 'user-settings'), '20081001' );
$scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' ); $scripts->add( 'sack', '/wp-includes/js/tw-sack.js', false, '1.6.1' );
$scripts->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '20080823' ); $scripts->add( 'quicktags', '/wp-includes/js/quicktags.js', false, '20080823' );