policy pages: Handle periods in heading ids.

This commit is contained in:
Max Goodman
2013-12-13 11:36:38 -08:00
parent 7774fc8d3f
commit a2aae81077

View File

@@ -69,7 +69,8 @@ r.ui.TOCScroller = Backbone.View.extend({
},
_tocFor: function($heading) {
return this.$toc.find('.' + $heading.attr('id')).children('a')
// heading ids can have periods in them, so we'll use getElementsByClassName :(
return $(this.$toc[0].getElementsByClassName($heading.attr('id'))).children('a')
},
_updateProgress: function() {