I have a 5 paragraphs that i want to reveal one by one with each click. I think that they must be hidden (
visibility: hidden
) and reveals one by one with jQuery .show().
Asked
Active
Viewed 66 times
-2

Ersin Fahredin
- 11
- 6
-
1Please read [ask]. Key phrases: "Search, and research" and "Explain ... any difficulties that have prevented you from solving it yourself". – Heretic Monkey Jan 17 '17 at 23:18
1 Answers
0
:hidden selector selects all hidden elements and :first selects first of those
$(document).click(function(){
$(":hidden:first").show();
});
alternatively, if u want to show a particular paragraph, you can be more specific e.g.:
$(document).click(function(){
$( /parent/ ).find("p:hidden:first").show();
});

Mateusz Sowiński
- 439
- 6
- 17