<div id='content'>Hello World</div>
<input type='button' id='hideshow' value='hide/show'>
jQuery(document).ready(function(){
jQuery('#hideshow').live('click', function(event) {
jQuery('#content').toggle('show');
});
});
对于jQuery 1.7及更高版本
jQuery(document).ready(function(){
jQuery('#hideshow').on('click', function(event) {
jQuery('#content').toggle('show');
});
});