From 471df8fb801dd9cc9e3f394b638953fde848f454 Mon Sep 17 00:00:00 2001 From: mac Date: Thu, 18 Apr 2019 15:05:37 -0600 Subject: [PATCH] Fixed issue where the page title was not being updated --- demo/js/jquery-ajax-loader.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/js/jquery-ajax-loader.js b/demo/js/jquery-ajax-loader.js index f7399e6..38da7ad 100644 --- a/demo/js/jquery-ajax-loader.js +++ b/demo/js/jquery-ajax-loader.js @@ -127,11 +127,11 @@ function pushHistory(href, bodyHtml) { function _loadData(href, el, bodyHtml, callBackFunction) { + var dynamicContent = bodyHtml; + if ($("#DynamicContent").length > 0 && bodyHtml.indexOf("DynamicContent") != -1) { var doc = $('').append($.parseHTML(bodyHtml, document, true)); - var dynamicContent = doc.find("#DynamicContent").html(); - - bodyHtml = dynamicContent; + dynamicContent = doc.find("#DynamicContent").html(); } @@ -142,7 +142,7 @@ function _loadData(href, el, bodyHtml, callBackFunction) { updateTitle(href, bodyHtml); pushHistory(href, bodyHtml); - loadeData($(el), bodyHtml); + loadeData($(el), dynamicContent); } if (el != "") {