Hide & Show paragraph using jquery - Web Development
31 Views

Hide & Show paragraph using jquery

We can show and hide paragraph using hide() show() method

$(“.btnHide”).click(function(){ This line of code will hide paragraph & .btnHide is class name of button . If you use id then your code would be like this $(#btnHide).click(function(){ becuase we use (#) this sign for id.

Now we will see another example just copy the code and run into browser

Output of code

$(“p.normal”).show();
$(“p.fast”).show(“fast”);
$(“p.slow”).show(“slow”);
$(“p.vfast”).show(110);
$(“p.vslow”).show(5000);
});

110 and 5000 are timing in miliseconds so 5000 miliseconds means 5 seconds it means last paragraph will take 5 seconds to hide and 5 seconds to show .

See more tutorials

Drop down in php

Insert form data into database using php

Leave a Reply

Your email address will not be published. Required fields are marked *