Skip to content

Commit

Permalink
Fix arrow image link for localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
kritika-singh3 committed Jun 14, 2019
1 parent fec64a6 commit 8e873a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/javascripts/_common-to-all-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ function getPathName() {
if (currentHref.indexOf("localhost:1313") >= 0) {
return "";
}
return element.prop('pathname').split("/")[1]
return "/" + element.prop('pathname').split("/")[1]
}

// START: Menu collapse
(function() {
var addArrowsToAllTopLevelItems = function() {
$(".book-menu nav li.level1.has-children").prepend(`<img class="menu-arrow" src="/${getPathName()}/images/arrow.png">`);
$(".book-menu nav li.level1.has-children").prepend(`<img class="menu-arrow" src="${getPathName()}/images/arrow.png">`);
};

var showOnlyTopLevelItems = function() {
Expand Down

0 comments on commit 8e873a6

Please sign in to comment.