jQuery wizard,一款创建步骤向导的插件

本文介绍了一款名为 jQuery Wizard 的插件,该插件能够帮助开发者轻松地为网站添加步骤向导。文章提供了插件的下载链接,并通过具体实例展示了如何在网页中引入和使用该插件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

版权声明:欢迎转载,请注明沉默王二原创。 https://blog.youkuaiyun.com/qing_gee/article/details/74926175

这篇文章完全没有技术难度,但我为什么要写呢?因为我想把这么好的一款插件推荐给需要的小伙伴。因为在我遇到这款插件之前,一直没有找到合适的(step-by-step wizards)创建步骤向导的插件。

一、下载和效果图

git的下载地址https://github.com/amazingSurge/jquery-wizard

这里写图片描述

我觉得效果还挺不错,不过原生的wizard并没有这么好看,需要加工一点css样式。

/* 步骤 */
.wizard-steps {
    display: table;
    width: 100%;
}

.wizard-steps > li.current, .wizard-steps > li.done {
    background: #41b3f9;
    color: #ffffff;
}
.wizard-steps > li.done {
    background: #7ace4c;
}
.wizard-steps > li {
    display: table-cell;
    padding: 10px 20px;
    background: #f7fafc;
}
.wizard-steps > li.current h4, .wizard-steps > li.done h4 {
    color: #ffffff;
}
.wizard-steps > li.current span, .wizard-steps > li.done span {
    border-color: #ffffff;
    color: #ffffff;
}
.wizard-steps > li span {
    border-radius: 100%;
    border: 1px solid rgba(120, 130, 140, 0.13);
    width: 40px;
    height: 40px;
    display: inline-block;
    vertical-align: middle;
    padding-top: 9px;
    margin-right: 8px;
    text-align: center;
}
.wizard-content {
    padding: 25px;
    border-color: rgba(120, 130, 140, 0.13);
    margin-bottom: 30px;
}

二、应用实例

1.引入js和css
<link type="text/css" rel="stylesheet" href="${ctx}/components/wizard/css/wizard.css" />
<script type="text/javascript" src="${ctx}/components/wizard/dist/jquery-wizard.js"></script>
2.页面布局
<div class="wizard" id="service_market_step">
    <ul class="wizard-steps" role="tablist">
        <li class="active" role="tab">
            <h4>
                <span>1</span>
                步骤
            </h4>
        </li>
        <li role="tab">
            <h4>
                <span>2</span>
                步骤
            </h4>
        </li>
        <li role="tab">
            <h4>
                <span>3</span>
                步骤
            </h4>
        </li>
    </ul>
    <div class="wizard-content">
        <div class="wizard-pane active" role="tabpanel">

        </div>
        <div class="wizard-pane" role="tabpanel">

        </div>
        <div class="wizard-pane" role="tabpanel">
        </div>
    </div>
</div>
3.初始化
$("#service_market_step").wizard({
    templates : {
        buttons : function buttons() {// 去掉前后的button
            return '';
        }
    },
});

别的我就不多说了,想用的更高深一点就去钻一钻。

看看别家程序员的程序人生吧!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值