I have a page where I show some text. I want to hide that text and show it only when someone clicks a link/button. I tried using this:
<script>
function f()
{
document.getElementById("line").focus();
document.getElementById("help").innerHTML = helptext();
}
$(function(){
$('p[id=help]').hide();
$('a[title=showcmd]').click(function(){
$('p[id=help]').slideIn();
$(this).hide();
f();
});
});
</script>
But it is not working.
helptextdefined anywhere? Please create a jsfiddle.net demo.slideInis not standard jQuery. I guess the code errors there (the console will tell you).