How can I get the index of a CoffeeScript .each loop? I've searched everywhere and can't seem to find a solid answer. I know how I can do this with vanilla jQuery, but I can't figure out how to add the index argument to function() in CoffeeScript.
here is my code currently:
video_list_element = $('#video-list li')
video_list_element.each ->
video_list_element.delay(100).animate({
"top": "0"
}, 2000)
I'm trying to multiply the value inside of .delay() by the index of the .each loop
Thank you so much for your help, I really appreciate it!!!
Regards, Tim