app/assets/javascripts/swim.js.coffee in speedo-0.0.5 vs app/assets/javascripts/swim.js.coffee in speedo-0.0.6
- old
+ new
@@ -3,9 +3,19 @@
# For Web-app mode, uncomment this (and the CSS in style.scss) to make the cols fill the browser
# $('.col1, .col2, .col3').css('height',$(window).height() - $('.main_nav').outerHeight() - $('.branding').outerHeight() - 60 + 'px')
# $(window).resize ->
# $('.col1, .col2, .col3').css('height',$(window).height() - $('.main_nav').outerHeight() - $('.branding').outerHeight() - 60 + 'px')
+ setTimeAgoInWords = () ->
+ $('.ago').each ->
+ t = $(this)
+ if(t.attr('datetime'))
+ date = new Date(t.attr('datetime'))
+ t.attr('title', date.toString())
+ t.text(date.timeAgoInWords() + ' ago')
+
+ setTimeAgoInWords()
+ setInterval(setTimeAgoInWords, 10000)
$('.popup').livequery ->
$(this).fancybox
overlayColor: "#fff"
transitionIn:"none"