How do I make .show & .hide work

I set them to have both on click event. but while the .hide function worked. Once i added a .show it stopped working.

<div id="text01">
<p onclick="hide_para(this,1000);">
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
</p>
<input type="button" value="show" onclick="showPara('#text01',1000);">
</div> <!--text1-->

the jquery/js

function hide_para(element, speed){
$(element).hide(speed);
}

function show_para(element, speed){
$(element).show(speed);

}
how do I fix this please?
thx
D

Hi there,

Would it not be easier to use .toggle(), instead of defining separate actions to hide and display the content?

Here’s an example to get you started (using .slideToggle()):

<!DOCTYPE html>
<html>
  <head>
    <style>p { width:400px; }</style>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
  </head>
  
  <body>
    <button>Toggle</button>
    <p>
      This is the paragraph to end all paragraphs.  You
      should feel <em>lucky</em> to have seen such a paragraph in
      your life.  Congratulations!
    </p>
    <script>
    $("button").click(function () {
      $("p").slideToggle("slow");
    });
    </script>
  </body>
</html>

Hello Pullo!
Will go head and try out your suggestion, thank you.