如何选择和隐藏HTML文件(DOM)中除前5个元素之外的所有元素

Zhe*_*hen 5 html jquery dom hide coffeescript

我试图使用coffeescript/jQuery来执行以下操作:

1)检索html中显示的所有"主题"(见下文)

2)隐藏显示的所有主题,但列出的前5个除外.

在此输入图像描述

我试着做以下但是没有用

//Retrieve the entire list of and hide all but the first 5 topics in the list
$(".topics .topic")[5..-1].hide()
Run Code Online (Sandbox Code Playgroud)

有人可以告诉我如何从HTML文档中正确检索主题列表,然后隐藏除前5个主题之外的所有主题吗?