diff --git a/app/assets/javascripts/legislation_annotatable.js.coffee b/app/assets/javascripts/legislation_annotatable.js.coffee index 33803ab43..01bd42bf5 100644 --- a/app/assets/javascripts/legislation_annotatable.js.coffee +++ b/app/assets/javascripts/legislation_annotatable.js.coffee @@ -25,7 +25,13 @@ App.LegislationAnnotatable = anchor = $(location).attr('hash') ann_id = anchor.split("-")[-1..] el = $("span[data-annotation-id='" + ann_id + "']") + App.LegislationAllegations.show_comments() $('html,body').animate({scrollTop: el.offset().top}) + $.event.trigger + type: "renderLegislationAnnotation" + annotation_id: ann_id + annotation_url: el.closest(".legislation-annotatable").data("legislation-annotatable-base-url") + offset: el.offset()["top"] initialize: -> $(document).on("renderLegislationAnnotation", App.LegislationAnnotatable.renderAnnotationComments)