iftomkins
11 years agoMaven
Fix: Hiding Unanswered Topics Widget when there are no topics
The unanswered topics widget does not hide itself when it is empty, instead it has a banner saying "There are no posts to display".
Not ideal functionality. So here's a little javascript fixer-upper to run on pageload:
//Hide unanswered topics widget if there are no unanswered topics
if($(".lia-component-forums-widget-unanswered-topics-taplet .lia-panel-status-banner-note").length > 0){
$(".lia-component-forums-widget-unanswered-topics-taplet").hide();
}