javascript - Show hide available content -


i have content in post. want hide until click link in post. have yet build site, idea.

  1. the first heading
  2. the second heading
  3. the third heading
  4. the fourth heading

/* content following hidden until clicked link above. / / content available wrapped in div tag, not loaded site. */

  1. content 1 show click "1. first heading"
  2. content 2 show click "2. second heading"
  3. content 3 show click "3. third heading"
  4. content 4 show click "4. fourth heading"

can use css or ajax / jquery create effect?

you using following jquery code:

$(document).ready(function(){   $("#hide").click(function(){     $("p").hide();   });   $("#show").click(function(){     $("p").show();   }); }); 

here complete demo how can hide , show element click event.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -