The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm coding a spoiler using jQuery. I have an error though.
I know the error, I just can't re-code it to fix it! Frustration ![]() 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 help is appreciated. |
#2
|
|||
|
|||
![]() |
#3
|
|||
|
|||
![]()
I know I need to use $(this), I just can't recode it to use it. I'm stumped
|
#4
|
|||
|
|||
![]()
Dude, the code are ok, i put the code in my forum and work perfectly
what is your problem? |
#5
|
|||
|
|||
![]()
This is an old thread, I forgot I posted it
![]() The problem is that when clicked it toggles all ID's of spoiler within the paragraph tag, and not the one that is clicked. It needed to be re-coded using ($this), which I never got round to doing. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|