Commit 950c3a2f authored by Douwe Maan's avatar Douwe Maan

Add variable to save us a double lookup

parent 42e39492
...@@ -57,8 +57,9 @@ require('vendor/jquery.scrollTo'); ...@@ -57,8 +57,9 @@ require('vendor/jquery.scrollTo');
} }
LineHighlighter.prototype.bindEvents = function() { LineHighlighter.prototype.bindEvents = function() {
$('#blob-content-holder').on('click', 'a[data-line-number]', this.clickHandler); const $blobContentHolder = $('#blob-content-holder');
$('#blob-content-holder').on('highlight:line', this.highlightHash); $blobContentHolder.on('click', 'a[data-line-number]', this.clickHandler);
$blobContentHolder.on('highlight:line', this.highlightHash);
}; };
LineHighlighter.prototype.highlightHash = function() { LineHighlighter.prototype.highlightHash = function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment