I know this is a really old question, but for people looking for a quick fix, this worked for me:
and. in the PHP / HTML file:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/.../jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#pClick").click(function(){
$("#pText").toggle();
$("#pText").text("...");
});
});
</script>
b. in the CSS file:
#pText {display: none;}
Now it works even with the first click. This is a simple, quick answer that I hope will be helpful.
source
share