From ed6fae518e4ef6b11415856ff3d21afc308c08ec Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 1 Feb 2016 16:01:26 -0500 Subject: [PATCH] moving breadcrumbs based on page-title existence --- js/app.js | 6 +++++- js/custom/upcp.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index f3540f1..2aa6a73 100644 --- a/js/app.js +++ b/js/app.js @@ -250,5 +250,9 @@ $(document).ready(function () { $("#magnifying-glass").on("click", function (){ $(".searchform").submit(); }); - $("#productBreadcrumbs").insert("#page-title"); + if($("#page-title").length > 0){ + $("#productBreadcrumbs").insert("#page-title"); + } else { + $("#productBreadcrumbs").insertBefore("#catTitleOutput"); + } }); \ No newline at end of file diff --git a/js/custom/upcp.js b/js/custom/upcp.js index f6d9619..7f5001e 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -230,5 +230,9 @@ $(document).ready(function () { $("#magnifying-glass").on("click", function (){ $(".searchform").submit(); }); - $("#productBreadcrumbs").insert("#page-title"); + if($("#page-title").length > 0){ + $("#productBreadcrumbs").insert("#page-title"); + } else { + $("#productBreadcrumbs").insertBefore("#catTitleOutput"); + } }); \ No newline at end of file -- 2.17.1