Issue with custom webpart multiple times on one page.
I am currently working on developing a webpart which runs some jquery with a toggling functionality on some of the elements in it. My issue here is that this webpart is meant to be used several times on the same webpartpage, which I have discovered courses me a lot of trouble, as the javascript will be loaded on the page several times trying to trigger functions on the same elements.
<p>I thought it would be clever to create a couple methods to change different values here and there, but in the end I ended having the same issue.</p>
<p>So now I'm out of ideas and my skills with jquery and javascript are limited. So any help, samples, pointers - anything that make me come that much closer to a solution, I will be greatefull for.</p>
<p>The jquery script:</p>

    $(document).ready(function (){ 
          $('.togglingDiv').find('dd').hide().end().find('dt').click(function() {
                 $(this).next().slideToggle("fast");
          });
    });

The HTML the jquery is toggling:

    <dl class="togglingDiv">
        <dt>Lorem ipsum</dt>
        <dd>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dd>
        <dt>Lorem ipsum</dt>
        <dd>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dd>
        <dt>Lorem ipsum</dt>
        <dd>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dd>
     </dl>
Issue with custom webpart multiple times on one page.
===

I am currently working on developing a webpart which runs some jquery with a toggling functionality on some of the elements in it. My issue here is that this webpart is meant to be used several times on the same webpartpage, which I have discovered courses me a lot of trouble, as the javascript will be loaded on the page several times trying to trigger functions on the same elements.
<p>I thought it would be clever to create a couple methods to change different values here and there, but in the end I ended having the same issue.</p>
<p>So now I'm out of ideas and my skills with jquery and javascript are limited. So any help, samples, pointers - anything that make me come that much closer to a solution, I will be greatefull for.</p>
<p>The jquery script:</p>

    $(document).ready(function (){ 
          $('.togglingDiv').find('dd').hide().end().find('dt').click(function() {
                 $(this).next().slideToggle("fast");
          });
    });

The HTML the jquery is toggling:

    <dl class="togglingDiv">
        <dt>Lorem ipsum</dt>
        <dd>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dd>
        <dt>Lorem ipsum</dt>
        <dd>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dd>
        <dt>Lorem ipsum</dt>
        <dd>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.</dd>
     </dl>