Instead of disabling the WordPress 3.1 Admin Bar, use this plugin, based on Codrops Fixed Fade Out Menu, to fade away the WordPress Admin Bar when you scroll down the page. The plugin is availeable in the WordPress Plugin Directory

Changelog:

  • 1.0.1 - Thanks to @TheFrosty, added is_admin_bar_showing()
  • 1.0.0 - initial release

Source:

<br />
&lt;?php<br />
/*<br />
Plugin Name: PerS Fade Away WordPress Admin Bar<br />
Plugin URI: http://soderlind.no/archives/2011/02/25/fade-away-wordpress-admin-bar/<br />
Description: Fade away the WordPress Admin Bar when you scroll down the page.<br />
Version: 1.0.1<br />
Author: PerS<br />
Author URI: http://soderlind.no<br />
*/</p>
<p>/*<br />
Change log:<br />
	1.0.1 - Thanks to @TheFrosty, added is_admin_bar_showing()<br />
    1.0.0 - initial release<br />
*/</p>
<p>if (!class_exists('ps_pers_fade_wp_admin_bar')) {<br />
    class ps_pers_fade_wp_admin_bar {<br />
		var $url = '';<br />
		function __construct(){<br />
			$this-&gt;url = plugins_url(basename(__FILE__), __FILE__);<br />
			add_action('wp_print_scripts', array(&amp;$this,'ps_pers_fade_wp_admin_bar_script'));<br />
		}<br />
		function ps_pers_fade_wp_admin_bar_script() {<br />
				if (is_admin_bar_showing()) {<br />
					wp_enqueue_script('jQuery('); // other scripts included with Wordpress: http://tinyurl.com/y875age<br />
					wp_enqueue_script('ps_pers_fade_wp_admin_bar_script', $this-&gt;url.'?ps_pers_fade_wp_admin_bar_javascript'); // embed javascript, see end of this file<br />
				}<br />
			}<br />
	} //End Class<br />
} //End if class exists statement</p>
<p>if (isset($_GET['ps_pers_fade_wp_admin_bar_javascript'])) {<br />
	//embed javascript<br />
	Header(&quot;content-type: application/x-javascript&quot;);<br />
	echo&lt;&lt;&lt;ENDJS<br />
/**<br />
* @desc PerS Fade Away WP Admin Bar<br />
* @author PerS - http://soderlind.no<br />
*/<br />
// Script from http://tympanus.net/codrops/2009/12/11/fixed-fade-out-menu-a-css-and-jquery-tutorial/<br />
jQuery(document).ready(function(){<br />
		jQuery(window).scroll(function(){<br />
			var scrollTop = jQuery(window).scrollTop();<br />
			if(scrollTop != 0)<br />
				jQuery('#wpadminbar').stop().animate({'opacity':'0.2'},400);<br />
			else<br />
				jQuery('#wpadminbar').stop().animate({'opacity':'1'},400);<br />
		});</p>
<p>		jQuery('#wpadminbar').hover(<br />
			function (e) {<br />
				var scrollTop = jQuery(window).scrollTop();<br />
				if(scrollTop != 0){<br />
					jQuery('#wpadminbar').stop().animate({'opacity':'1'},400);<br />
				}<br />
			},<br />
			function (e) {<br />
				var scrollTop = jQuery(window).scrollTop();<br />
				if(scrollTop != 0){<br />
					jQuery('#wpadminbar').stop().animate({'opacity':'0.2'},400);<br />
				}<br />
			}<br />
		);<br />
});</p>
<p>ENDJS;</p>
<p>} else {<br />
	if (class_exists('ps_pers_fade_wp_admin_bar')) {<br />
    	$ps_pers_fade_wp_admin_bar_var = new ps_pers_fade_wp_admin_bar();<br />
	}<br />
}<br />
?&gt;<br />