1

Web サイトに jquery アコーディオンがあり、アコーディオンの最初の部分の div に nicescroll を配置しました。

アコーディオンの次の部分に移動して新しいコンテンツが表示されると、前の部分の nicescrollbar がまだ表示されています。

アコーディオンの他の部分に移動するときに、どのように削除できますか?

<script type="text/javascript">
jQuery(document).ready(function () {
    $("#wizard").accordion({
        heightStyle: "content"
    });
    $('#wizard').accordion();
    $('#wizard button').click(function (e) {
        e.preventDefault();
        var delta = ($(this).is('.next') ? 1 : -1);
        $('#wizard').accordion('option', 'active', (
        $('#wizard').accordion('option', 'active') + delta));
    });
    $("#boxscroll").niceScroll({
        touchbehavior: false,
        cursorcolor: "#34759a",
        cursoropacitymax: 0.7,
        cursorwidth: 7,
        cursorborder: "1px solid #2848BE",
        cursorborderradius: "8px",
        background: "#ccc",
        autohidemode: false
    });
});
</script> 
4

1 に答える 1