From 3fcdfdd9075cb4347444048d4b7b85c69f362f69 Mon Sep 17 00:00:00 2001 From: Olexander Gnatishin Date: Mon, 16 Sep 2013 10:44:29 +0200 Subject: [PATCH] add getCurrTarget function that return current target object --- js/hopscotch-0.1.1.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/hopscotch-0.1.1.js b/js/hopscotch-0.1.1.js index 1b107319..694aca58 100644 --- a/js/hopscotch-0.1.1.js +++ b/js/hopscotch-0.1.1.js @@ -1987,6 +1987,15 @@ return currTour; }; + /** + * getCurrTarget + * + * @return {Object} The currently visible target. + */ + this.getCurrTarget = function() { + return utils.getStepTarget(getCurrStep()); + }; + /** * getCurrStepNum * @@ -2044,7 +2053,7 @@ * to hopscotch.configure or hopscotch.listen will not be removed). If * evtName is null or undefined, callbacks for all events will be removed. * - * @param {string} evtName Optional Event name for which we should remove callbacks + * @param {string} evtName Optional Event name for which we should remove callbacks * @param {boolean} tourOnly Optional flag to indicate we should only remove callbacks added * by a tour. Defaults to false. * @returns {Object} Hopscotch