我无法让它发挥作用。
students = ["nova", "alexander", "johnathan", "amanda"]
classColors = ["red", "orange", "yellow", "green", "purple", "blue"]
h1Tags = [] # h1 tag generator
countTags = []
for color in classColors
for room in rooms
h1Tags.push("##{color}-#{room}-h1")
countTags.push("##{color}-#{room}-count")
populateChildCount = ->
# work in progress
for tag in h1Tags
for count in countTags
$(tag).text $(count).children().length
我想将tag
的文字更改为div id所具有的子项数量。