1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "Utf-8">5 <Scriptsrc= "Https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js">6 </Script>7 <Script>8 $ (document). Ready (function(){9 $("Button"). Click (function(){Ten $("P"). Hide ("Slow",function(){ One Alert ("the paragraph is now hidden."); A }); - }); - }); the </Script> - </Head> - <Body> - <Button>Hide</Button> + <P>The content of our paragraphs, click on the "Hide" button and I will disappear</P> - </Body> + </HTML>
The comparison does not have callback effect:
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <MetaCharSet= "Utf-8">5 <Scriptsrc= "Https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js">6 </Script>7 <Script>8 $ (document). Ready (function(){9 $("Button"). Click (function(){Ten $("P"). Hide ( +); One Alert ("now the paragraph is hidden."); A }); - }); - </Script> the </Head> - <Body> - <Button>Hide</Button> - <P>This is a paragraph with very little content</P> + </Body> - </HTML>
"Learn to light it" JQuery callback Method Example