From 4edbbadfd11cc2e833529d4eacebb32a9df3372c Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Mon, 4 Apr 2016 11:47:00 +0200 Subject: [PATCH] Break condition in multiple lines. --- app/assets/javascripts/parallax.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/parallax.coffee b/app/assets/javascripts/parallax.coffee index b75e9d4..05a10b7 100644 --- a/app/assets/javascripts/parallax.coffee +++ b/app/assets/javascripts/parallax.coffee @@ -8,7 +8,11 @@ content_top = content_left = width_delta = height_delta = 0 App.init = -> $('a[href*=\\#]').each -> - if location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') and location.hostname == this.hostname and this.hash.replace(/#/,'') + lpath = location.pathname.replace(/^\//,'') + tpath = this.pathname.replace(/^\//,'') + if lpath == tpath and + location.hostname == this.hostname and + this.hash.replace(/#/,'') $targetId = $(this.hash) $targetAnchor = $('[name=' + this.hash.slice(1) + ']') $target = if $targetId.length