[-Stash-] schreef:
>   $(document).ready(function () {
>     $('span.spoiler').hide();
>     $('span.show').click(function() {
>       $(this).next('span.spoiler').slideToggle('fast');
>     });
>   });
>
>   
i think you look for something like this

$(function(){
   // create link and hide spoiler
    $('.spoiler').before('<span 
class="spoilertoggle">Spoiler</span>').hide();
    // toggle the spoilers
    $('span.spoilertoggle').toggle(
       function(){ $(this).next('.spoiler').show(); },
       function(){ $(this).next('.spoiler').hide(); }
    )
});

-- 
David Duymelinck
________________
[EMAIL PROTECTED]


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to