Forum Discussion

iftomkins's avatar
11 years ago

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();
}

No RepliesBe the first to reply