SOURCE

console 命令行工具 X clear

                    
>
console
/*$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});*/
//注意:jquery中的方法一遍就是xxx();----xxx(function(){});
$(document).ready(function(){
  $('button').click(function(){
    //$('p').hide();
    $('p').toggle();
  });
});
<h2>This is a heading,when click button,the content toggle of hide with show.</h2> 
 <p>This is a paragraph.</p> 
 <p>This is another paragraph.</p> 
 <button type="button">Click me</button>