Commit c17a9b78 by Kyle Fiedler

fixed empty space below accordion nav items that dont have a subtitle

parent 021f86a9
...@@ -125,8 +125,12 @@ section.course-index { ...@@ -125,8 +125,12 @@ section.course-index {
font-weight: normal; font-weight: normal;
display: block; display: block;
margin: 0; margin: 0;
&:empty {
display: none;
}
} }
} }
&:hover { &:hover {
background: rgba(0, 0, 0, .1); background: rgba(0, 0, 0, .1);
......
...@@ -41,15 +41,17 @@ ...@@ -41,15 +41,17 @@
$(".ui-accordion-header a, .ui-accordion-content .subtitle").each(function() { $(".ui-accordion-header a, .ui-accordion-content .subtitle").each(function() {
var wordArray = $(this).text().split(" "); var wordArray = $(this).text().split(" ");
var finalTitle = ""; var finalTitle = "";
for (i=0;i<=wordArray.length-1;i++) { if (wordArray.isEmptyObject()) {
finalTitle += wordArray[i]; for (i=0;i<=wordArray.length-1;i++) {
if (i == (wordArray.length-2)) { finalTitle += wordArray[i];
finalTitle += "&nbsp;"; if (i == (wordArray.length-2)) {
} else { finalTitle += "&nbsp;";
finalTitle += " "; } else {
finalTitle += " ";
}
} }
$(this).html(finalTitle);
} }
$(this).html(finalTitle);
}); });
}); });
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment