Commit 55947add authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Revert "When anchor is clicked set the correct condition."

This reverts commit 5140bd88.
parent 3bf9b660
...@@ -21,12 +21,10 @@ $(document).ready -> ...@@ -21,12 +21,10 @@ $(document).ready ->
$("html, body").animate $("html, body").animate
scrollTop: $(".navbar").offset().top - $(".navbar").height() scrollTop: $(".navbar").offset().top - $(".navbar").height()
, 200 , 200
false
$("a").click (event) -> $("a").click (e) ->
link = event.target unless location.hash is ""
isAnchor = link instanceof HTMLAnchorElement
if (location.hash != "" || isAnchor)
$("html,body").animate $("html,body").animate
scrollTop: $(this).offset().top - $(".navbar").height() - 3 scrollTop: $(this).offset().top - $(".navbar").height() - 3
, 200 , 200
...@@ -5,12 +5,10 @@ $(document).ready -> ...@@ -5,12 +5,10 @@ $(document).ready ->
$("html, body").animate $("html, body").animate
scrollTop: $(".navbar").offset().top - $(".navbar").height() scrollTop: $(".navbar").offset().top - $(".navbar").height()
, 200 , 200
false
$("a").click (event) -> $("a").click (e) ->
link = event.target unless location.hash is ""
isAnchor = link instanceof HTMLAnchorElement
if (location.hash != "" || isAnchor)
$("html,body").animate $("html,body").animate
scrollTop: $(this).offset().top - $(".navbar").height() - 3 scrollTop: $(this).offset().top - $(".navbar").height() - 3
, 200 , 200
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