bootstrapwizard 参数_jquery.bootstrap.wizard.min.js

这段内容介绍了jQuery Twitter Bootstrap Wizard插件的使用,包括如何配置和操作导航按钮。插件支持Bootstrap 2.2.x到3.0,并提供了向前、向后、跳转到第一项和最后一项的功能。它允许在导航过程中自定义事件回调,如onNext、onPrevious、onFirst、onLast和onBack。此外,还支持禁用和启用选项卡以及隐藏显示选项卡。
摘要由CSDN通过智能技术生成

/*!

* jQuery twitter bootstrap wizard plugin

* Examples and documentation at: http://github.com/VinceG/twitter-bootstrap-wizard

* version 1.0

* Requires jQuery v1.3.2 or later

* Supports Bootstrap 2.2.x, 2.3.x, 3.0

* Dual licensed under the MIT and GPL licenses:

* http://www.opensource.org/licenses/mit-license.php

* http://www.gnu.org/licenses/gpl.html

* Authors: Vadim Vincent Gabriel (http://vadimg.com), Jason Gill (www.gilluminate.com)

*/

(function(e){

var n=function(d,k){

d=e(d);var a=this,g=[],c=e.extend({

},e.fn.bootstrapWizard.defaults,k),f=null,b=null;this.rebindClick=function(h,a){

h.unbind("click",a).bind("click",a)

};this.fixNavigationButtons=function(){

f.length||(b.find("a:first").tab("show"),f=b.find('li:has([data-toggle="tab"]):first'));e(c.previousSelector,d).toggleClass("disabled",a.firstIndex()>=a.currentIndex());e(c.nextSelector,d).toggleClass("disabled",a.currentIndex()>=a.navigationLength());e(c.backSelector,d).toggleClass("disabled",

0==g.length);a.rebindClick(e(c.nextSelector,d),a.next);a.rebindClick(e(c.previousSelector,d),a.previous);a.rebindClick(e(c.lastSelector,d),a.last);a.rebindClick(e(c.firstSelector,d),a.first);a.rebindClick(e(c.backSelector,d),a.back);if(c.onTabShow&&"function"===typeof c.onTabShow&&!1===c.onTabShow(f,b,a.currentIndex()))return!1

};this.next=function(h){

if(d.hasClass("last")||c.onNext&&"function"===typeof c.onNext&&!1===c.onNext(f,b,a.nextIndex()))return!1;h=a.currentIndex();$index=a.nextIndex();$index>

a.navigationLength()||(g.push(h),b.find('li:has([data-toggle="tab"]):eq('+$index+") a").tab("show"))

};this.previous=function(h){

if(d.hasClass("first")||c.onPrevious&&"function"===typeof c.onPrevious&&!1===c.onPrevious(f,b,a.previousIndex()))return!1;h=a.currentIndex();$index=a.previousIndex();0>$index||(g.push(h),b.find('li:has([data-toggle="tab"]):eq('+$index+") a").tab("show"))

};this.first=function(h){

if(c.onFirst&&"function"===typeof c.onFirst&&!1===c.onFirst(f,b,a.firstIndex())||d.hasClass("disabled"))return!1;

g.push(a.currentIndex());b.find('li:has([data-toggle="tab"]):eq(0) a').tab("show")

};this.last=function(h){

if(c.onLast&&"function"===typeof c.onLast&&!1===c.onLast(f,b,a.lastIndex())||d.hasClass("disabled"))return!1;g.push(a.currentIndex());b.find('li:has([data-toggle="tab"]):eq('+a.navigationLength()+") a").tab("show")

};this.back=function(){

if(0==g.length)return null;var a=g.pop();if(c.onBack&&"function"===typeof c.onBack&&!1===c.onBack(f,b,a))return g.push(a),!1;d.find('li:has([data-toggle="tab"]):eq('+

a+") a").tab("show")

};this.currentIndex=function(){

return b.find('li:has([data-toggle="tab"])').index(f)

};this.firstIndex=function(){

return 0

};this.lastIndex=function(){

return a.navigationLength()

};this.getIndex=function(a){

return b.find('li:has([data-toggle="tab"])').index(a)

};this.nextIndex=function(){

return b.find('li:has([data-toggle="tab"])').index(f)+1

};this.previousIndex=function(){

return b.find('li:has([data-toggle="tab"])').index(f)-1

};this.navigationLength=function(){

return b.find('li:has([data-toggle="tab"])').length-

1

};this.activeTab=function(){

return f

};this.nextTab=function(){

return b.find('li:has([data-toggle="tab"]):eq('+(a.currentIndex()+1)+")").length?b.find('li:has([data-toggle="tab"]):eq('+(a.currentIndex()+1)+")"):null

};this.previousTab=function(){

return 0>=a.currentIndex()?null:b.find('li:has([data-toggle="tab"]):eq('+parseInt(a.currentIndex()-1)+")")

};this.show=function(b){

b=isNaN(b)?d.find('li:has([data-toggle="tab"]) a[href=#'+b+"]"):d.find('li:has([data-toggle="tab"]):eq('+b+") a");0

(g.push(a.currentIndex()),b.tab("show"))

};this.disable=function(a){

b.find('li:has([data-toggle="tab"]):eq('+a+")").addClass("disabled")

};this.enable=function(a){

b.find('li:has([data-toggle="tab"]):eq('+a+")").removeClass("disabled")

};this.hide=function(a){

b.find('li:has([data-toggle="tab"]):eq('+a+")").hide()

};this.display=function(a){

b.find('li:has([data-toggle="tab"]):eq('+a+")").show()

};this.remove=function(a){

var c="undefined"!=typeof a[

...

...

(完整源码请下载查看)

...

展开> <收缩

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值