Skip to content

Commit

Permalink
Merge pull request #28 from jbellsey/bugfix-trim-content
Browse files Browse the repository at this point in the history
Bugfix: Trim inner content
  • Loading branch information
Miguel Ángel Pérez committed Aug 16, 2014
2 parents 479b44e + fa05d2d commit 04c7a30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.smoothState.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
getContentById: function (id, $html) {
$html = ($html instanceof jQuery) ? $html : utility.htmlDoc($html);
var $insideElem = $html.find(id),
updatedContainer = ($insideElem.length) ? $insideElem.html() : $html.filter(id).html(),
updatedContainer = ($insideElem.length) ? $.trim($insideElem.html()) : $html.filter(id).html(),
newContent = (updatedContainer.length) ? $(updatedContainer) : null;
return newContent;
},
Expand Down Expand Up @@ -565,4 +565,4 @@
/** Defines the smoothState plugin */
$.fn.smoothState = declareSmoothState;

})(jQuery, window, document);
})(jQuery, window, document);

0 comments on commit 04c7a30

Please sign in to comment.