diff --git a/README.md b/README.md index f901d8f..d818f53 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ args: A comma delimited list of arguments to pass to the jquery function ``` --- > _example_ + ```html
diff --git a/lib/bumper-core.js b/lib/bumper-core.js index ffd52ff..bb1ba8c 100644 --- a/lib/bumper-core.js +++ b/lib/bumper-core.js @@ -23,7 +23,7 @@ BumperCore = (function() { function BumperCore() {} - BumperCore.prototype.version = '3.0.0'; + BumperCore.prototype.version = '3.0.1'; return BumperCore; diff --git a/lib/bumper-dom-jquery.js b/lib/bumper-dom-jquery.js index 649b1d2..de1b31b 100644 --- a/lib/bumper-dom-jquery.js +++ b/lib/bumper-dom-jquery.js @@ -39,7 +39,7 @@ for (_i = 0, _len = matches.length; _i < _len; _i++) { match = matches[_i]; splitArray = match.replace(/[{}]/g, '').split(':'); - $element = $rootEl.closest("" + splitArray[0]); + $element = $rootEl.parent().closest("" + splitArray[0]); if (restrictToParents === false && !$element.length) { $element = $("" + splitArray[0]).first(); } diff --git a/src/bumper-core.coffee b/src/bumper-core.coffee index c00e5a5..0febc60 100644 --- a/src/bumper-core.coffee +++ b/src/bumper-core.coffee @@ -16,7 +16,7 @@ ) @, -> class BumperCore - version: '3.0.0' + version: '3.0.1' window.Bumper ||= {} window.Bumper.Core ||= new BumperCore diff --git a/src/bumper-dom-jquery.coffee b/src/bumper-dom-jquery.coffee index ad968c3..a040f8a 100644 --- a/src/bumper-dom-jquery.coffee +++ b/src/bumper-dom-jquery.coffee @@ -33,7 +33,7 @@ splitArray = match.replace(/[{}]/g, '').split ':' # find match within element's parent chain - $element = $rootEl.closest("#{splitArray[0]}") + $element = $rootEl.parent().closest("#{splitArray[0]}") # find first matching elemnt anywhere in the dom if restrictToParents == false && !$element.length