Commit 34e4af29 by Kyle Fiedler

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

parent 664d3a1d
...@@ -125,6 +125,10 @@ section.course-index { ...@@ -125,6 +125,10 @@ section.course-index {
font-weight: normal; font-weight: normal;
display: block; display: block;
margin: 0; margin: 0;
&:empty {
display: none;
}
} }
} }
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
$(".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 = "";
if (wordArray.isEmptyObject()) {
for (i=0;i<=wordArray.length-1;i++) { for (i=0;i<=wordArray.length-1;i++) {
finalTitle += wordArray[i]; finalTitle += wordArray[i];
if (i == (wordArray.length-2)) { if (i == (wordArray.length-2)) {
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
} }
} }
$(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