Single quotes for consistency, cache 'this' selector.

This commit is contained in:
Connor Shea 2016-08-15 11:18:48 -06:00
parent c770201061
commit 1595047777
No known key found for this signature in database
GPG Key ID: 1993299A3C9BE6CF
1 changed files with 4 additions and 3 deletions

View File

@ -223,9 +223,10 @@
return $('.navbar-toggle').toggleClass('active');
});
$body.on("click", ".js-toggle-diff-comments", function(e) {
$(this).toggleClass('active');
var notesHolders = $(this).closest(".diff-file").find(".notes_holder");
if ($(this).hasClass('active')) {
var $this = $(this);
$this.toggleClass('active');
var notesHolders = $this.closest('.diff-file').find('.notes_holder');
if ($this.hasClass('active')) {
notesHolders.show();
} else {
notesHolders.hide();