Skip to content

Instantly share code, notes, and snippets.

@dmonopoly
Created December 19, 2011 05:51
Show Gist options
  • Save dmonopoly/1495601 to your computer and use it in GitHub Desktop.
Save dmonopoly/1495601 to your computer and use it in GitHub Desktop.
$(".memory").hover ->
memory = $(this).attr('id')
id = memory.split('_')[1] # get id of e.g. memory_4
#find memory
time_frames = <% Memory.find(id).time_frames %>
for time_frame in time_frames
tf_id = time_frame.id
$("#"+tf_id).toggle()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment