I have created some spoiler BBCode using jQuery. A nice simple click paragraph & dropdown.
However, when it's dropping down it messes with the template. It extends the template whilst it drops down, then the template goes back to normal. It's not a big issue but I'd like to contain it so that it doesn't mess with the template.
My code (to analyse or leech - I don't mind):
HTML Code:
<style type="text/css">
p#spoilercontent{
display:none;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$('p#spoiler').click(function() {
$('p#spoilercontent').toggle(400);
});
});
</script>
<div align="center">
<strong><p id="spoiler"><u>Spoiler:</u></strong><br />
<p id="spoilercontent">{param}</p>
</div>
Any ideas?