From 1f62cc296b995baf00bdce204bae70356f1c4cb4 Mon Sep 17 00:00:00 2001 From: getrefined Date: Thu, 28 Aug 2014 17:31:44 +0100 Subject: [PATCH] ADD: count method for steps --- build/jquery.steps.js | 13 +++++++++++++ src/publics.js | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/build/jquery.steps.js b/build/jquery.steps.js index 99ca096..4de1569 100644 --- a/build/jquery.steps.js +++ b/build/jquery.steps.js @@ -1333,6 +1333,19 @@ $.fn.steps.add = function (step) return insertStep(this, getOptions(this), state, state.stepCount, step); }; +/** + * Gets the step count. + * + * @method count + * @return {Integer} step count + * @for steps + **/ +$.fn.steps.count = function () +{ + var state = getState(this); + return state.stepCount; +}; + /** * Removes the control functionality completely and transforms the current state to the initial HTML structure. * diff --git a/src/publics.js b/src/publics.js index 9a80050..8619add 100644 --- a/src/publics.js +++ b/src/publics.js @@ -36,6 +36,19 @@ $.fn.steps.add = function (step) return insertStep(this, getOptions(this), state, state.stepCount, step); }; +/** + * Gets the step count. + * + * @method count + * @return {Integer} step count + * @for steps + **/ +$.fn.steps.count = function () +{ + var state = getState(this); + return state.stepCount; +}; + /** * Removes the control functionality completely and transforms the current state to the initial HTML structure. *