-2

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().

  • 1
    Please 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 Answers1

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();
});