Skip to content

Instantly share code, notes, and snippets.

@josemarluedke
Created March 18, 2013 01:24
Show Gist options
  • Save josemarluedke/5184428 to your computer and use it in GitHub Desktop.
Save josemarluedke/5184428 to your computer and use it in GitHub Desktop.
#= require_self
#= require_tree .
window.Tasker =
Common:
initPage: ->
# If you're using the Turbolinks and you need run a code only one time, put something here.
# if you're not using the turbolinks, there's no difference between init and initPage.
# toggle links
$(".toggle-link").click (e) ->
target = $($(this).attr("href")).toggleClass("hidden")
#$.scrollTo(target);
e.preventDefault()
init: ->
# Something here. This is called in every page, with or without Turbolinks.
finish: ->
# Something here. This is called in every page, with or without Turbolinks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment