diff --git a/build/jquery.steps-1.1.0.zip b/build/jquery.steps-1.1.0.zip
index b762d08..3b077ab 100644
Binary files a/build/jquery.steps-1.1.0.zip and b/build/jquery.steps-1.1.0.zip differ
diff --git a/build/jquery.steps.js b/build/jquery.steps.js
index 956b05a..b2e75a5 100644
--- a/build/jquery.steps.js
+++ b/build/jquery.steps.js
@@ -1,6 +1,6 @@
/*!
- * jQuery Steps v1.1.0 - 09/04/2014
- * Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
+ * jQuery Steps v1.1.0 - 09/30/2015
+ * Copyright (c) 2015 Rafael Staib (http://www.jquery-steps.com)
* Licensed under MIT http://www.opensource.org/licenses/MIT
*/
;(function ($, undefined)
@@ -233,12 +233,12 @@ function destroy(wizard, options)
// Remove virtual data objects from the wizard
wizard.unbind(eventNamespace).removeData("uid").removeData("options")
.removeData("state").removeData("steps").removeData("eventNamespace")
- .find(".actions a").unbind(eventNamespace);
+ .find("> .actions a").unbind(eventNamespace);
// Remove attributes and CSS classes from the wizard
wizard.removeClass(options.clearFixCssClass + " vertical");
- var contents = wizard.find(".content > *");
+ var contents = wizard.find("> .content > *");
// Remove virtual data objects from panels and their titles
contents.removeData("loaded").removeData("mode").removeData("url");
@@ -249,7 +249,7 @@ function destroy(wizard, options)
._removeAria("hidden");
// Empty panels if the mode is set to 'async' or 'iframe'
- wizard.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();
+ wizard.find("> .content > [data-mode='async'],.content > [data-mode='iframe']").empty();
var wizardSubstitute = $("<{0} class=\"{1}\">{0}>".format(wizard.get(0).tagName, wizard.attr("class")));
@@ -259,7 +259,7 @@ function destroy(wizard, options)
wizardSubstitute._id(wizardId);
}
- wizardSubstitute.html(wizard.find(".content").html());
+ wizardSubstitute.html(wizard.find("> .content").html());
wizard.after(wizardSubstitute);
wizard.remove();
@@ -277,7 +277,7 @@ function destroy(wizard, options)
**/
function finishStep(wizard, state)
{
- var currentStep = wizard.find(".steps li").eq(state.currentIndex);
+ var currentStep = wizard.find("> .steps li").eq(state.currentIndex);
if (wizard.triggerHandler("finishing", [state.currentIndex]))
{
@@ -517,7 +517,7 @@ function goToStep(wizard, options, state, index)
}
else
{
- wizard.find(".steps li").eq(oldIndex).addClass("error");
+ wizard.find("> .steps li").eq(oldIndex).addClass("error");
}
return true;
@@ -609,7 +609,7 @@ function insertStep(wizard, options, state, index, step)
}
state.stepCount++;
- var contentContainer = wizard.find(".content"),
+ var contentContainer = wizard.find("> .content"),
header = $("<{0}>{1}{0}>".format(options.headerTag, step.title)),
body = $("<{0}>{0}>".format(options.bodyTag));
@@ -709,7 +709,7 @@ function loadAsyncContent(wizard, options, state)
switch (getValidEnumValue(contentMode, currentStep.contentMode))
{
case contentMode.iframe:
- wizard.find(".content > .body").eq(state.currentIndex).empty()
+ wizard.find("> .content > .body").eq(state.currentIndex).empty()
.html("")
.data("loaded", "1");
break;
@@ -821,12 +821,12 @@ function refreshPagination(wizard, options, state)
{
if (options.enablePagination)
{
- var finish = wizard.find(".actions a[href$='#finish']").parent(),
- next = wizard.find(".actions a[href$='#next']").parent();
+ var finish = wizard.find("> .actions a[href$='#finish']").parent(),
+ next = wizard.find("> .actions a[href$='#next']").parent();
if (!options.forceMoveForward)
{
- var previous = wizard.find(".actions a[href$='#previous']").parent();
+ var previous = wizard.find("> .actions a[href$='#previous']").parent();
previous._enableAria(state.currentIndex > 0);
}
@@ -859,7 +859,7 @@ function refreshStepNavigation(wizard, options, state, oldIndex)
{
var currentOrNewStepAnchor = getStepAnchor(wizard, state.currentIndex),
currentInfo = $("" + options.labels.current + " "),
- stepTitles = wizard.find(".content > .title");
+ stepTitles = wizard.find("> .content > .title");
if (oldIndex != null)
{
@@ -896,7 +896,7 @@ function refreshSteps(wizard, options, state, index)
uniqueHeaderId = uniqueId + _titleSuffix + i,
title = wizard.find(".title").eq(i)._id(uniqueHeaderId);
- wizard.find(".steps a").eq(i)._id(uniqueStepId)
+ wizard.find("> .steps a").eq(i)._id(uniqueStepId)
._aria("controls", uniqueBodyId).attr("href", "#" + uniqueHeaderId)
.html(renderTemplate(options.titleTemplate, { index: i + 1, title: title.html() }));
wizard.find(".body").eq(i)._id(uniqueBodyId)
@@ -921,7 +921,7 @@ function registerEvents(wizard, options)
wizard.bind("keyup" + eventNamespace, keyUpHandler);
}
- wizard.find(".actions a").bind("click" + eventNamespace, paginationClickHandler);
+ wizard.find("> .actions a").bind("click" + eventNamespace, paginationClickHandler);
}
/**
@@ -960,13 +960,13 @@ function removeStep(wizard, options, state, index)
// Set the "first" class to the new first step button
if (index === 0)
{
- wizard.find(".steps li").first().addClass("first");
+ wizard.find("> .steps li").first().addClass("first");
}
// Set the "last" class to the new last step button
if (index === state.stepCount)
{
- wizard.find(".steps li").eq(index).addClass("last");
+ wizard.find("> .steps li").eq(index).addClass("last");
}
refreshSteps(wizard, options, state, index);
@@ -1131,7 +1131,7 @@ function renderTitle(wizard, options, state, header, index)
uniqueStepId = uniqueId + _tabSuffix + index,
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
uniqueHeaderId = uniqueId + _titleSuffix + index,
- stepCollection = wizard.find(".steps > ul"),
+ stepCollection = wizard.find("> .steps > ul"),
title = renderTemplate(options.titleTemplate, {
index: index + 1,
title: header.html()
@@ -1193,7 +1193,7 @@ function saveCurrentStateToCookie(wizard, options, state)
function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback)
{
- var stepContents = wizard.find(".content > .body"),
+ var stepContents = wizard.find("> .content > .body"),
effect = getValidEnumValue(transitionEffect, options.transitionEffect),
effectSpeed = options.transitionEffectSpeed,
newStep = stepContents.eq(index),
diff --git a/build/jquery.steps.min.js b/build/jquery.steps.min.js
index 755aedf..6d7d393 100644
--- a/build/jquery.steps.min.js
+++ b/build/jquery.steps.min.js
@@ -1,6 +1,6 @@
/*!
- * jQuery Steps v1.1.0 - 09/04/2014
- * Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
+ * jQuery Steps v1.1.0 - 09/30/2015
+ * Copyright (c) 2015 Rafael Staib (http://www.jquery-steps.com)
* Licensed under MIT http://www.opensource.org/licenses/MIT
*/
-!function(a,b){function c(a,b){o(a).push(b)}function d(d,e,f){var g=d.children(e.headerTag),h=d.children(e.bodyTag);g.length>h.length?R(Z,"contents"):g.length *");e.removeData("loaded").removeData("mode").removeData("url"),e.removeAttr("id").removeAttr("role").removeAttr("tabindex").removeAttr("class").removeAttr("style")._removeAria("labelledby")._removeAria("hidden"),b.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();var f=a('<{0} class="{1}">{0}>'.format(b.get(0).tagName,b.attr("class"))),g=b._id();return null!=g&&""!==g&&f._id(g),f.html(b.find(".content").html()),b.after(f),b.remove(),f}function h(a,b){var c=a.find(".steps li").eq(b.currentIndex);a.triggerHandler("finishing",[b.currentIndex])?(c.addClass("done").removeClass("error"),a.triggerHandler("finished",[b.currentIndex])):c.addClass("error")}function i(a){var b=a.data("eventNamespace");return null==b&&(b="."+q(a),a.data("eventNamespace",b)),b}function j(a,b){var c=q(a);return a.find("#"+c+V+b)}function k(a,b){var c=q(a);return a.find("#"+c+W+b)}function l(a,b){var c=q(a);return a.find("#"+c+X+b)}function m(a){return a.data("options")}function n(a){return a.data("state")}function o(a){return a.data("steps")}function p(a,b){var c=o(a);return(0>b||b>=c.length)&&R(Y),c[b]}function q(a){var b=a.data("uid");return null==b&&(b=a._id(),null==b&&(b="steps-uid-".concat(T),a._id(b)),T++,a.data("uid",b)),b}function r(a,c){if(S("enumType",a),S("keyOrValue",c),"string"==typeof c){var d=a[c];return d===b&&R("The enum key '{0}' does not exist.",c),d}if("number"==typeof c){for(var e in a)if(a[e]===c)return c;R("Invalid enum value '{0}'.",c)}else R("Invalid key or value type.")}function s(a,b,c){return B(a,b,c,v(c,1))}function t(a,b,c){return B(a,b,c,f(c,1))}function u(a,b,c,d){if((0>d||d>=c.stepCount)&&R(Y),!(b.forceMoveForward&&de||e>d.stepCount)&&R(Y),f=a.extend({},bb,f),y(b,e,f),d.currentIndex!==d.stepCount&&d.currentIndex>=e&&(d.currentIndex++,O(b,c,d)),d.stepCount++;var g=b.find(".content"),h=a("<{0}>{1}{0}>".format(c.headerTag,f.title)),i=a("<{0}>{0}>".format(c.bodyTag));return(null==f.contentMode||f.contentMode===$.html)&&i.html(f.content),0===e?g.prepend(i).prepend(h):k(b,e-1).after(i).after(h),K(b,d,i,e),N(b,c,d,h,e),F(b,c,d,e),e===d.currentIndex&&E(b,c,d),D(b,c,d),b}function y(a,b,c){o(a).splice(b,0,c)}function z(b){var c=a(this),d=m(c),e=n(c);if(d.suppressPaginationOnFocus&&c.find(":focus").is(":input"))return b.preventDefault(),!1;var f={left:37,right:39};b.keyCode===f.left?(b.preventDefault(),t(c,d,e)):b.keyCode===f.right&&(b.preventDefault(),s(c,d,e))}function A(b,c,d){if(d.stepCount>0){var e=d.currentIndex,f=p(b,e);if(!c.enableContentCache||!f.contentLoaded)switch(r($,f.contentMode)){case $.iframe:b.find(".content > .body").eq(d.currentIndex).empty().html('').data("loaded","1");break;case $.async:var g=k(b,e)._aria("busy","true").empty().append(M(c.loadingTemplate,{text:c.labels.loading}));a.ajax({url:f.contentUrl,cache:!1}).done(function(a){g.empty().html(a)._aria("busy","false").data("loaded","1"),b.triggerHandler("contentLoaded",[e])})}}}function B(a,b,c,d){var e=c.currentIndex;if(d>=0&&d0)}b.enableFinishButton&&b.showFinishButtonAlways?(d._enableAria(c.stepCount>0),e._enableAria(c.stepCount>1&&c.stepCount>c.currentIndex+1)):(d._showAria(b.enableFinishButton&&c.stepCount===c.currentIndex+1),e._showAria(0===c.stepCount||c.stepCount>c.currentIndex+1)._enableAria(c.stepCount>c.currentIndex+1||!b.enableFinishButton))}}function E(b,c,d,e){var f=j(b,d.currentIndex),g=a(''+c.labels.current+" "),h=b.find(".content > .title");if(null!=e){var i=j(b,e);i.parent().addClass("done").removeClass("error")._selectAria(!1),h.eq(e).removeClass("current").next(".body").removeClass("current"),g=i.find(".current-info"),f.focus()}f.prepend(g).parent()._selectAria().removeClass("done")._enableAria(),h.eq(d.currentIndex).addClass("current").next(".body").addClass("current")}function F(a,b,c,d){for(var e=q(a),f=d;fd||d>=c.stepCount||c.currentIndex===d?!1:(I(a,d),c.currentIndex>d&&(c.currentIndex--,O(a,b,c)),c.stepCount--,l(a,d).remove(),k(a,d).remove(),j(a,d).parent().remove(),0===d&&a.find(".steps li").first().addClass("first"),d===c.stepCount&&a.find(".steps li").eq(d).addClass("last"),F(a,b,c,d),D(a,b,c),!0)}function I(a,b){o(a).splice(b,1)}function J(b,c,d){var e='<{0} class="{1}">{2}{0}>',f=r(_,c.stepsOrientation),g=f===_.vertical?" vertical":"",h=a(e.format(c.contentContainerTag,"content "+c.clearFixCssClass,b.html())),i=a(e.format(c.stepsContainerTag,"steps "+c.clearFixCssClass,'')),j=h.children(c.headerTag),k=h.children(c.bodyTag);b.attr("role","application").empty().append(i).append(h).addClass(c.cssClass+" "+c.clearFixCssClass+g),k.each(function(c){K(b,d,a(this),c)}),j.each(function(e){N(b,c,d,a(this),e)}),E(b,c,d),L(b,c,d)}function K(a,b,c,d){var e=q(a),f=e+W+d,g=e+X+d;c._id(f).attr("role","tabpanel")._aria("labelledby",g).addClass("body")._showAria(b.currentIndex===d)}function L(a,b,c){if(b.enablePagination){var d='<{0} class="actions {1}">{0}>',e='{1}',f="";b.forceMoveForward||(f+=e.format("previous",b.labels.previous)),f+=e.format("next",b.labels.next),b.enableFinishButton&&(f+=e.format("finish",b.labels.finish)),b.enableCancelButton&&(f+=e.format("cancel",b.labels.cancel)),a.append(d.format(b.actionContainerTag,b.clearFixCssClass,b.labels.pagination,f)),D(a,b,c),A(a,b,c)}}function M(a,c){for(var d=a.match(/#([a-z]*)#/gi),e=0;e ul"),m=M(c.titleTemplate,{index:f+1,title:e.html()}),n=a(''+m+"");n._enableAria(c.enableAllSteps||d.currentIndex>f),d.currentIndex>f&&n.addClass("done"),e._id(k).attr("tabindex","-1").addClass("title"),0===f?l.prepend(n):l.find("li").eq(f-1).after(n),0===f&&l.find("li").removeClass("first").eq(f).addClass("first"),f===d.stepCount-1&&l.find("li").removeClass("last").eq(f).addClass("last"),n.children("a").bind("click"+i(b),Q)}function O(b,c,d){c.saveState&&a.cookie&&a.cookie(U+q(b),d.currentIndex)}function P(b,c,d,e,f,g){var h=b.find(".content > .body"),i=r(ab,c.transitionEffect),j=c.transitionEffectSpeed,k=h.eq(e),l=h.eq(f);switch(i){case ab.fade:case ab.slide:var m=i===ab.fade?"fadeOut":"slideUp",o=i===ab.fade?"fadeIn":"slideDown";d.transitionElement=k,l[m](j,function(){var b=a(this)._showAria(!1).parent().parent(),c=n(b);c.transitionElement&&(c.transitionElement[o](j,function(){a(this)._showAria()}).promise().done(g),c.transitionElement=null)});break;case ab.slideLeft:var p=l.outerWidth(!0),q=e>f?-p:p,s=e>f?p:-p;a.when(l.animate({left:q},j,function(){a(this)._showAria(!1)}),k.css("left",s+"px")._showAria().animate({left:0},j)).done(g);break;default:a.when(l._showAria(!1),k._showAria()).done(g)}}function Q(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),e=m(d),f=n(d),g=f.currentIndex;if(c.parent().is(":not(.disabled):not(.current)")){var h=c.attr("href"),i=parseInt(h.substring(h.lastIndexOf("-")+1),0);u(d,e,f,i)}return g===f.currentIndex?(j(d,g).focus(),!1):void 0}function R(a){throw arguments.length>1&&(a=a.format(Array.prototype.slice.call(arguments,1))),new Error(a)}function S(a,b){null==b&&R("The argument '{0}' is null or undefined.",a)}a.fn.extend({_aria:function(a,b){return this.attr("aria-"+a,b)},_removeAria:function(a){return this.removeAttr("aria-"+a)},_enableAria:function(a){return null==a||a?this.removeClass("disabled")._aria("disabled","false"):this.addClass("disabled")._aria("disabled","true")},_showAria:function(a){return null==a||a?this.show()._aria("hidden","false"):this.hide()._aria("hidden","true")},_selectAria:function(a){return null==a||a?this.addClass("current")._aria("selected","true"):this.removeClass("current")._aria("selected","false")},_id:function(a){return a?this.attr("id",a):this.attr("id")}}),String.prototype.format||(String.prototype.format=function(){for(var b=1===arguments.length&&a.isArray(arguments[0])?arguments[0]:arguments,c=this,d=0;d#index#. #title#',loadingTemplate:' #text#',autoFocus:!1,enableAllSteps:!1,enableKeyNavigation:!0,enablePagination:!0,suppressPaginationOnFocus:!0,enableContentCache:!0,enableCancelButton:!1,enableFinishButton:!0,preloadContent:!1,showFinishButtonAlways:!1,forceMoveForward:!1,saveState:!1,startIndex:0,transitionEffect:ab.none,transitionEffectSpeed:200,onStepChanging:function(){return!0},onStepChanged:function(){},onCanceled:function(){},onFinishing:function(){return!0},onFinished:function(){},onContentLoaded:function(){},onInit:function(){},labels:{cancel:"Cancel",current:"current step:",pagination:"Pagination",finish:"Finish",next:"Next",previous:"Previous",loading:"Loading ..."}}}(jQuery);
\ No newline at end of file
+!function(a,b){function c(a,b){o(a).push(b)}function d(d,e,f){var g=d.children(e.headerTag),h=d.children(e.bodyTag);g.length>h.length?R(Z,"contents"):g.length .actions a").unbind(d),b.removeClass(c.clearFixCssClass+" vertical");var e=b.find("> .content > *");e.removeData("loaded").removeData("mode").removeData("url"),e.removeAttr("id").removeAttr("role").removeAttr("tabindex").removeAttr("class").removeAttr("style")._removeAria("labelledby")._removeAria("hidden"),b.find("> .content > [data-mode='async'],.content > [data-mode='iframe']").empty();var f=a('<{0} class="{1}">{0}>'.format(b.get(0).tagName,b.attr("class"))),g=b._id();return null!=g&&""!==g&&f._id(g),f.html(b.find("> .content").html()),b.after(f),b.remove(),f}function h(a,b){var c=a.find("> .steps li").eq(b.currentIndex);a.triggerHandler("finishing",[b.currentIndex])?(c.addClass("done").removeClass("error"),a.triggerHandler("finished",[b.currentIndex])):c.addClass("error")}function i(a){var b=a.data("eventNamespace");return null==b&&(b="."+q(a),a.data("eventNamespace",b)),b}function j(a,b){var c=q(a);return a.find("#"+c+V+b)}function k(a,b){var c=q(a);return a.find("#"+c+W+b)}function l(a,b){var c=q(a);return a.find("#"+c+X+b)}function m(a){return a.data("options")}function n(a){return a.data("state")}function o(a){return a.data("steps")}function p(a,b){var c=o(a);return(0>b||b>=c.length)&&R(Y),c[b]}function q(a){var b=a.data("uid");return null==b&&(b=a._id(),null==b&&(b="steps-uid-".concat(T),a._id(b)),T++,a.data("uid",b)),b}function r(a,c){if(S("enumType",a),S("keyOrValue",c),"string"==typeof c){var d=a[c];return d===b&&R("The enum key '{0}' does not exist.",c),d}if("number"==typeof c){for(var e in a)if(a[e]===c)return c;R("Invalid enum value '{0}'.",c)}else R("Invalid key or value type.")}function s(a,b,c){return B(a,b,c,v(c,1))}function t(a,b,c){return B(a,b,c,f(c,1))}function u(a,b,c,d){if((0>d||d>=c.stepCount)&&R(Y),!(b.forceMoveForward&&d .steps li").eq(e).addClass("error"),!0}}function v(a,b){return a.currentIndex+b}function w(b){var c=a.extend(!0,{},ca,b);return this.each(function(){var b=a(this),e={currentIndex:c.startIndex,currentStep:null,stepCount:0,transitionElement:null};b.data("options",c),b.data("state",e),b.data("steps",[]),d(b,c,e),J(b,c,e),G(b,c),c.autoFocus&&0===T&&j(b,c.startIndex).focus(),b.triggerHandler("init",[c.startIndex])})}function x(b,c,d,e,f){(0>e||e>d.stepCount)&&R(Y),f=a.extend({},ba,f),y(b,e,f),d.currentIndex!==d.stepCount&&d.currentIndex>=e&&(d.currentIndex++,O(b,c,d)),d.stepCount++;var g=b.find("> .content"),h=a("<{0}>{1}{0}>".format(c.headerTag,f.title)),i=a("<{0}>{0}>".format(c.bodyTag));return(null==f.contentMode||f.contentMode===$.html)&&i.html(f.content),0===e?g.prepend(i).prepend(h):k(b,e-1).after(i).after(h),K(b,d,i,e),N(b,c,d,h,e),F(b,c,d,e),e===d.currentIndex&&E(b,c,d),D(b,c,d),b}function y(a,b,c){o(a).splice(b,0,c)}function z(b){var c=a(this),d=m(c),e=n(c);if(d.suppressPaginationOnFocus&&c.find(":focus").is(":input"))return b.preventDefault(),!1;var f={left:37,right:39};b.keyCode===f.left?(b.preventDefault(),t(c,d,e)):b.keyCode===f.right&&(b.preventDefault(),s(c,d,e))}function A(b,c,d){if(d.stepCount>0){var e=d.currentIndex,f=p(b,e);if(!c.enableContentCache||!f.contentLoaded)switch(r($,f.contentMode)){case $.iframe:b.find("> .content > .body").eq(d.currentIndex).empty().html('').data("loaded","1");break;case $.async:var g=k(b,e)._aria("busy","true").empty().append(M(c.loadingTemplate,{text:c.labels.loading}));a.ajax({url:f.contentUrl,cache:!1}).done(function(a){g.empty().html(a)._aria("busy","false").data("loaded","1"),b.triggerHandler("contentLoaded",[e])})}}}function B(a,b,c,d){var e=c.currentIndex;if(d>=0&&d .actions a[href$='#finish']").parent(),e=a.find("> .actions a[href$='#next']").parent();if(!b.forceMoveForward){var f=a.find("> .actions a[href$='#previous']").parent();f._enableAria(c.currentIndex>0)}b.enableFinishButton&&b.showFinishButtonAlways?(d._enableAria(c.stepCount>0),e._enableAria(c.stepCount>1&&c.stepCount>c.currentIndex+1)):(d._showAria(b.enableFinishButton&&c.stepCount===c.currentIndex+1),e._showAria(0===c.stepCount||c.stepCount>c.currentIndex+1)._enableAria(c.stepCount>c.currentIndex+1||!b.enableFinishButton))}}function E(b,c,d,e){var f=j(b,d.currentIndex),g=a(''+c.labels.current+" "),h=b.find("> .content > .title");if(null!=e){var i=j(b,e);i.parent().addClass("done").removeClass("error")._selectAria(!1),h.eq(e).removeClass("current").next(".body").removeClass("current"),g=i.find(".current-info"),f.focus()}f.prepend(g).parent()._selectAria().removeClass("done")._enableAria(),h.eq(d.currentIndex).addClass("current").next(".body").addClass("current")}function F(a,b,c,d){for(var e=q(a),f=d;f .steps a").eq(f)._id(g)._aria("controls",h).attr("href","#"+i).html(M(b.titleTemplate,{index:f+1,title:j.html()})),a.find(".body").eq(f)._id(h)._aria("labelledby",i)}}function G(a,b){var c=i(a);a.bind("canceled"+c,b.onCanceled),a.bind("contentLoaded"+c,b.onContentLoaded),a.bind("finishing"+c,b.onFinishing),a.bind("finished"+c,b.onFinished),a.bind("init"+c,b.onInit),a.bind("stepChanging"+c,b.onStepChanging),a.bind("stepChanged"+c,b.onStepChanged),b.enableKeyNavigation&&a.bind("keyup"+c,z),a.find("> .actions a").bind("click"+c,C)}function H(a,b,c,d){return 0>d||d>=c.stepCount||c.currentIndex===d?!1:(I(a,d),c.currentIndex>d&&(c.currentIndex--,O(a,b,c)),c.stepCount--,l(a,d).remove(),k(a,d).remove(),j(a,d).parent().remove(),0===d&&a.find("> .steps li").first().addClass("first"),d===c.stepCount&&a.find("> .steps li").eq(d).addClass("last"),F(a,b,c,d),D(a,b,c),!0)}function I(a,b){o(a).splice(b,1)}function J(b,c,d){var e='<{0} class="{1}">{2}{0}>',f=r(_,c.stepsOrientation),g=f===_.vertical?" vertical":"",h=a(e.format(c.contentContainerTag,"content "+c.clearFixCssClass,b.html())),i=a(e.format(c.stepsContainerTag,"steps "+c.clearFixCssClass,'')),j=h.children(c.headerTag),k=h.children(c.bodyTag);b.attr("role","application").empty().append(i).append(h).addClass(c.cssClass+" "+c.clearFixCssClass+g),k.each(function(c){K(b,d,a(this),c)}),j.each(function(e){N(b,c,d,a(this),e)}),E(b,c,d),L(b,c,d)}function K(a,b,c,d){var e=q(a),f=e+W+d,g=e+X+d;c._id(f).attr("role","tabpanel")._aria("labelledby",g).addClass("body")._showAria(b.currentIndex===d)}function L(a,b,c){if(b.enablePagination){var d='<{0} class="actions {1}">{0}>',e='{1}',f="";b.forceMoveForward||(f+=e.format("previous",b.labels.previous)),f+=e.format("next",b.labels.next),b.enableFinishButton&&(f+=e.format("finish",b.labels.finish)),b.enableCancelButton&&(f+=e.format("cancel",b.labels.cancel)),a.append(d.format(b.actionContainerTag,b.clearFixCssClass,b.labels.pagination,f)),D(a,b,c),A(a,b,c)}}function M(a,c){for(var d=a.match(/#([a-z]*)#/gi),e=0;e .steps > ul"),m=M(c.titleTemplate,{index:f+1,title:e.html()}),n=a(''+m+"");n._enableAria(c.enableAllSteps||d.currentIndex>f),d.currentIndex>f&&n.addClass("done"),e._id(k).attr("tabindex","-1").addClass("title"),0===f?l.prepend(n):l.find("li").eq(f-1).after(n),0===f&&l.find("li").removeClass("first").eq(f).addClass("first"),f===d.stepCount-1&&l.find("li").removeClass("last").eq(f).addClass("last"),n.children("a").bind("click"+i(b),Q)}function O(b,c,d){c.saveState&&a.cookie&&a.cookie(U+q(b),d.currentIndex)}function P(b,c,d,e,f,g){var h=b.find("> .content > .body"),i=r(aa,c.transitionEffect),j=c.transitionEffectSpeed,k=h.eq(e),l=h.eq(f);switch(i){case aa.fade:case aa.slide:var m=i===aa.fade?"fadeOut":"slideUp",o=i===aa.fade?"fadeIn":"slideDown";d.transitionElement=k,l[m](j,function(){var b=a(this)._showAria(!1).parent().parent(),c=n(b);c.transitionElement&&(c.transitionElement[o](j,function(){a(this)._showAria()}).promise().done(g),c.transitionElement=null)});break;case aa.slideLeft:var p=l.outerWidth(!0),q=e>f?-p:p,s=e>f?p:-p;a.when(l.animate({left:q},j,function(){a(this)._showAria(!1)}),k.css("left",s+"px")._showAria().animate({left:0},j)).done(g);break;default:a.when(l._showAria(!1),k._showAria()).done(g)}}function Q(b){b.preventDefault();var c=a(this),d=c.parent().parent().parent().parent(),e=m(d),f=n(d),g=f.currentIndex;if(c.parent().is(":not(.disabled):not(.current)")){var h=c.attr("href"),i=parseInt(h.substring(h.lastIndexOf("-")+1),0);u(d,e,f,i)}return g===f.currentIndex?(j(d,g).focus(),!1):void 0}function R(a){throw arguments.length>1&&(a=a.format(Array.prototype.slice.call(arguments,1))),new Error(a)}function S(a,b){null==b&&R("The argument '{0}' is null or undefined.",a)}a.fn.extend({_aria:function(a,b){return this.attr("aria-"+a,b)},_removeAria:function(a){return this.removeAttr("aria-"+a)},_enableAria:function(a){return null==a||a?this.removeClass("disabled")._aria("disabled","false"):this.addClass("disabled")._aria("disabled","true")},_showAria:function(a){return null==a||a?this.show()._aria("hidden","false"):this.hide()._aria("hidden","true")},_selectAria:function(a){return null==a||a?this.addClass("current")._aria("selected","true"):this.removeClass("current")._aria("selected","false")},_id:function(a){return a?this.attr("id",a):this.attr("id")}}),String.prototype.format||(String.prototype.format=function(){for(var b=1===arguments.length&&a.isArray(arguments[0])?arguments[0]:arguments,c=this,d=0;d#index#. #title#',loadingTemplate:' #text#',autoFocus:!1,enableAllSteps:!1,enableKeyNavigation:!0,enablePagination:!0,suppressPaginationOnFocus:!0,enableContentCache:!0,enableCancelButton:!1,enableFinishButton:!0,preloadContent:!1,showFinishButtonAlways:!1,forceMoveForward:!1,saveState:!1,startIndex:0,transitionEffect:aa.none,transitionEffectSpeed:200,onStepChanging:function(a,b,c){return!0},onStepChanged:function(a,b,c){},onCanceled:function(a){},onFinishing:function(a,b){return!0},onFinished:function(a,b){},onContentLoaded:function(a,b){},onInit:function(a,b){},labels:{cancel:"Cancel",current:"current step:",pagination:"Pagination",finish:"Finish",next:"Next",previous:"Previous",loading:"Loading ..."}}}(jQuery);
\ No newline at end of file
diff --git a/src/privates.js b/src/privates.js
index 95362ce..da61bc0 100644
--- a/src/privates.js
+++ b/src/privates.js
@@ -173,12 +173,12 @@ function destroy(wizard, options)
// Remove virtual data objects from the wizard
wizard.unbind(eventNamespace).removeData("uid").removeData("options")
.removeData("state").removeData("steps").removeData("eventNamespace")
- .find(".actions a").unbind(eventNamespace);
+ .find("> .actions a").unbind(eventNamespace);
// Remove attributes and CSS classes from the wizard
wizard.removeClass(options.clearFixCssClass + " vertical");
- var contents = wizard.find(".content > *");
+ var contents = wizard.find("> .content > *");
// Remove virtual data objects from panels and their titles
contents.removeData("loaded").removeData("mode").removeData("url");
@@ -189,7 +189,7 @@ function destroy(wizard, options)
._removeAria("hidden");
// Empty panels if the mode is set to 'async' or 'iframe'
- wizard.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty();
+ wizard.find("> .content > [data-mode='async'],.content > [data-mode='iframe']").empty();
var wizardSubstitute = $("<{0} class=\"{1}\">{0}>".format(wizard.get(0).tagName, wizard.attr("class")));
@@ -199,7 +199,7 @@ function destroy(wizard, options)
wizardSubstitute._id(wizardId);
}
- wizardSubstitute.html(wizard.find(".content").html());
+ wizardSubstitute.html(wizard.find("> .content").html());
wizard.after(wizardSubstitute);
wizard.remove();
@@ -217,7 +217,7 @@ function destroy(wizard, options)
**/
function finishStep(wizard, state)
{
- var currentStep = wizard.find(".steps li").eq(state.currentIndex);
+ var currentStep = wizard.find("> .steps li").eq(state.currentIndex);
if (wizard.triggerHandler("finishing", [state.currentIndex]))
{
@@ -457,7 +457,7 @@ function goToStep(wizard, options, state, index)
}
else
{
- wizard.find(".steps li").eq(oldIndex).addClass("error");
+ wizard.find("> .steps li").eq(oldIndex).addClass("error");
}
return true;
@@ -549,7 +549,7 @@ function insertStep(wizard, options, state, index, step)
}
state.stepCount++;
- var contentContainer = wizard.find(".content"),
+ var contentContainer = wizard.find("> .content"),
header = $("<{0}>{1}{0}>".format(options.headerTag, step.title)),
body = $("<{0}>{0}>".format(options.bodyTag));
@@ -649,7 +649,7 @@ function loadAsyncContent(wizard, options, state)
switch (getValidEnumValue(contentMode, currentStep.contentMode))
{
case contentMode.iframe:
- wizard.find(".content > .body").eq(state.currentIndex).empty()
+ wizard.find("> .content > .body").eq(state.currentIndex).empty()
.html("")
.data("loaded", "1");
break;
@@ -761,12 +761,12 @@ function refreshPagination(wizard, options, state)
{
if (options.enablePagination)
{
- var finish = wizard.find(".actions a[href$='#finish']").parent(),
- next = wizard.find(".actions a[href$='#next']").parent();
+ var finish = wizard.find("> .actions a[href$='#finish']").parent(),
+ next = wizard.find("> .actions a[href$='#next']").parent();
if (!options.forceMoveForward)
{
- var previous = wizard.find(".actions a[href$='#previous']").parent();
+ var previous = wizard.find("> .actions a[href$='#previous']").parent();
previous._enableAria(state.currentIndex > 0);
}
@@ -799,7 +799,7 @@ function refreshStepNavigation(wizard, options, state, oldIndex)
{
var currentOrNewStepAnchor = getStepAnchor(wizard, state.currentIndex),
currentInfo = $("" + options.labels.current + " "),
- stepTitles = wizard.find(".content > .title");
+ stepTitles = wizard.find("> .content > .title");
if (oldIndex != null)
{
@@ -836,7 +836,7 @@ function refreshSteps(wizard, options, state, index)
uniqueHeaderId = uniqueId + _titleSuffix + i,
title = wizard.find(".title").eq(i)._id(uniqueHeaderId);
- wizard.find(".steps a").eq(i)._id(uniqueStepId)
+ wizard.find("> .steps a").eq(i)._id(uniqueStepId)
._aria("controls", uniqueBodyId).attr("href", "#" + uniqueHeaderId)
.html(renderTemplate(options.titleTemplate, { index: i + 1, title: title.html() }));
wizard.find(".body").eq(i)._id(uniqueBodyId)
@@ -861,7 +861,7 @@ function registerEvents(wizard, options)
wizard.bind("keyup" + eventNamespace, keyUpHandler);
}
- wizard.find(".actions a").bind("click" + eventNamespace, paginationClickHandler);
+ wizard.find("> .actions a").bind("click" + eventNamespace, paginationClickHandler);
}
/**
@@ -900,13 +900,13 @@ function removeStep(wizard, options, state, index)
// Set the "first" class to the new first step button
if (index === 0)
{
- wizard.find(".steps li").first().addClass("first");
+ wizard.find("> .steps li").first().addClass("first");
}
// Set the "last" class to the new last step button
if (index === state.stepCount)
{
- wizard.find(".steps li").eq(index).addClass("last");
+ wizard.find("> .steps li").eq(index).addClass("last");
}
refreshSteps(wizard, options, state, index);
@@ -1071,7 +1071,7 @@ function renderTitle(wizard, options, state, header, index)
uniqueStepId = uniqueId + _tabSuffix + index,
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
uniqueHeaderId = uniqueId + _titleSuffix + index,
- stepCollection = wizard.find(".steps > ul"),
+ stepCollection = wizard.find("> .steps > ul"),
title = renderTemplate(options.titleTemplate, {
index: index + 1,
title: header.html()
@@ -1133,7 +1133,7 @@ function saveCurrentStateToCookie(wizard, options, state)
function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback)
{
- var stepContents = wizard.find(".content > .body"),
+ var stepContents = wizard.find("> .content > .body"),
effect = getValidEnumValue(transitionEffect, options.transitionEffect),
effectSpeed = options.transitionEffectSpeed,
newStep = stepContents.eq(index),