jQuery show/hide slider not working in jQuery 1.5.x?
<p>I am using the following script here: <a href="http://8wayrun.com/wiki/algol/" rel="nofollow">http://8wayrun.com/wiki/algol/</a></p>

<pre><code>XenForo.register('.ToggleContents', 'XenForo.ToggleContents');

XenForo.ToggleContents = function($toc)
{
    var hideText = 'hide';
    var showText = 'show';
    var isVisible = true;

    $toc.ready(function() {
        $toc.find(':first').append('&lt;span class="toggle"&gt;(&lt;a href="#"&gt;'+hideText+'&lt;/a&gt;)&lt;/span&gt;');
    });

    $toc.find('.toggle:first').click(function(e)
    {
        e.preventDefault();

        if (isVisible = !isVisible)
        {
            $toc.find('.toggle a:first').html(hideText);
            $toc.find('.contents:first').slideDown();
        }
        else
        {
            $toc.find('.toggle a:first').html(showText);
            $toc.find('.contents:first').slideUp();
        }
    });
}
</code></pre>

<p>Its pretty simple what it does. The first thing it does is attach a <code>&lt;span class="toggle"&gt;hide&lt;/a&gt;</code> link to any div with the ".ToggleContents" class... this works perfect.</p>

<p>The next thing it does is take the link it just created, prevents the default function and changes it into a hide/show link instead. This was working GREAT in jQuery 1.4.x. However, in jQuery 1.5.x it doesn't work at all. The <code>e.preventDefault()</code> is never run...</p>

<p>Which tells me that <code>.find('.toggle:first')</code> is not working in 1.5.x. Does anyone know what I should be using now?</p>
