在引导浏览中禁用上一个按钮

时间:2018-12-01 07:20:02

标签: bootstrap-tour

有这样的旅行

var TourToolTipPoolConfiguration = new Tour({
            name: 'TourToolTipPoolConfiguration',
            steps: [
                {
                    onNext: function (TourToolTipPoolConfiguration) {
                        TourToolTipPoolConfiguration.goTo(3);
                    },
                    element: "#TimeExpireTicket",
                    title: "foo",
                    content: "test1"
                },
                {
                    element: "#DayNumber",
                    title: "foo",
                    content: "test2"
                },
                {
                    element: "#SavePoolConfig",
                    title: "foo",
                    content: "test3"
                }
            ]
        });

step1或step2是可选的,我隐藏了div display:none,但是如果在步骤2中浏览了init,我需要禁用prev按钮,因为step1是隐藏的,该怎么做?我尝试onPrev评估div是否可见但不起作用

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以简单地使用CSS隐藏它:

button[data-role='prev'] {
  display: none;
}