0
4

3 に答える 3

0

このようなもの:

$(document).ready(function() {
    $(".show-comments").click(function(){
        var oThisLink = jQuery(this);
        oThisLink.toggleClass('someclassname');
        if( oThisLink.hasClass('someclassname') ) {
            oThisLink.text('Hide Comments');
            jQuery(".comments-container").slideDown("slow");
        }
        else {
            oThisLink.text('Show Comments');
            jQuery(".comments-container").slideUp("slow");
        }
    });
});
于 2013-04-16T08:15:08.517 に答える