diff --git a/jquery.smoothState.js b/jquery.smoothState.js index 14ce99c..e5135e2 100644 --- a/jquery.smoothState.js +++ b/jquery.smoothState.js @@ -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; }, @@ -565,4 +565,4 @@ /** Defines the smoothState plugin */ $.fn.smoothState = declareSmoothState; -})(jQuery, window, document); \ No newline at end of file +})(jQuery, window, document);