...

View Full Version : hidden div doesn't show: Why?



NLuu
12-09-2009, 06:25 PM
:rolleyes:

What did I do wrong? I would like to have an anchor link with hidden text. When I click on the anchor link, I want to see a text drop below showing the Keep trying information. It keeps giving me "object expected" error message.

What object I need to put in there. Thanks.

Here is the code:



<body>
<a href="#" onclick="showDiv('divFundamentals');return false;">Javascript Fundamentals</a>
<div id="divFundamentals" style="display:none;">

Basic - Javascript
Keep trying:

Keep trying
- Try hard 1
- Try hard 2
- Try hard 3
- Try hard 4
- Try hard 5

</div>


<script>
function showDiv(id)
{
$('#' + id).show();
}
</script>

</body>

_Aerospace_Eng_
12-09-2009, 06:29 PM
Do have jquery or any other type of prototype library with your files?

NLuu
12-10-2009, 05:24 AM
Aerospace, thanks for quick reply. We've got it work now.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum