That all works well and nice, but if I have more than one comment box
on a page it isn't going to work because I would have more than one
commentbox div IDs.

On Jul 21, 8:36 am, Olaf Bosch <[EMAIL PROTECTED]> wrote:
> dan schrieb:
>
> > Hello, I wish to use slidetoggle with multiple divs. I have
> > implemented it using only one div however I want all of the divs to
> > operate independently.
>
> You have trouble with CLASS and ID, try this:
>
> $(document).ready(function() {
> $('#commentbox').hide();
>
> $('a#comment-toggle').click(function() {
>      $('#commentbox').slideToggle("slow");
>      alert($('#commentbox'));
>      return false;
>      });
>
> });
>
>      <div class="story">
>        <div class="storytitle">
>          hello
>        </div>
>        <div class="storybg">
>          blah blah blah
>        </div>
>        <div class="storybottom">
>          <a href="#" id="comment-toggle" name="comment-toggle">comment</a>
>        </div>
>        <div id="commentbox">
>          comment form
>        </div>
>      </div>
>
> Is better to use ID, is faster. You have not more as one comment form
> pro page ;)
>
> --
> Viele Grüße, Olaf
>
> -------------------------------
> [EMAIL PROTECTED]://olaf-bosch.dewww.akitafreund.de
> -------------------------------

Reply via email to