jQuery Show/Hide Div

前端 未结 3 810
星月不相逢
星月不相逢 2021-01-28 16:38

I\'m using this for a show/hide div expander, which is working fine, however, the HTML entities aren\'t being outputted.

$(document).ready(function() {
    $(\'.         


        
3条回答
  •  面向向阳花
    2021-01-28 17:13

    Have you tried using .html rather then .text

    $(document).ready(function() {
        $('.slickbox').hide();
        $("#slick-toggle").toggle(function() {
            $(this).html("▲ See Less");
            $('.slickbox').slideToggle(500);
        }, function() {
            $(this).html("See More ▼");
            $('.slickbox').slideToggle(500);
        });
    });
    

提交回复
热议问题