Browse Source

Break condition in multiple lines.

master
Georg Hopp 10 years ago
parent
commit
4edbbadfd1
  1. 6
      app/assets/javascripts/parallax.coffee

6
app/assets/javascripts/parallax.coffee

@ -8,7 +8,11 @@ content_top = content_left = width_delta = height_delta = 0
App.init = -> App.init = ->
$('a[href*=\\#]').each -> $('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) $targetId = $(this.hash)
$targetAnchor = $('[name=' + this.hash.slice(1) + ']') $targetAnchor = $('[name=' + this.hash.slice(1) + ']')
$target = if $targetId.length $target = if $targetId.length

Loading…
Cancel
Save