I'm having trouble with this code. Whenever i clicked the button to show the hidden text, it displays the text but only like for 1 second and hides again. Am i missing or something?

$(document).ready(function(){
$("h3").hide();

$(window).load(function(){
  $('#loginbutton').click(function(){
    $("h3").show();


});
});
});

Here is some working code you can adapt to your needs....

<h3>Content</h3>
<button id="loginbutton">Click</button>  
<script>
  $(document).ready(function(){
     $("h3").hide();
     $('#loginbutton').click(function(){
       $("h3").show();
     });
  });
</script>