Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8924713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:29:31+00:00 2026-06-15T07:29:31+00:00

I am using backbone and: https://github.com/pragmaticly/smart-time-ago When I load the page there is nothing

  • 0

I am using backbone and:
https://github.com/pragmaticly/smart-time-ago

When I load the page there is nothing displayed where the time ago is supposed to be(but backbone is working).

Here is my backbone view:

class Voice.Views.PostsIndex extends Backbone.View

        template: JST['posts/index']

        initialize: ->
                @collection.on('reset', @render, this)

        render: ->
                $(@el).html(@template(posts: @collection)).timeago
                this

templates/posts/index.jst.eco

<% for post in @posts.models: %>
        <tbody id="postdata"><tr><td>
                <center>
                <% if post.get('content').length > 140: %>
                        <%=post.get('content').substring(0, 140)+"\t\t"%>
                        ...<a href="show/<%= post.get('id') %>">see more</a>
                <% else: %>
                        <%= post.get('content') %>
                <% end %>
        <br>    </center>
        <span class="green pull-left"><%= post.get('agrees') %>&nbsp;</span>
        <span class="red pull-left"><%= post.get('disagrees') %>&nbsp;</span>
        <span class="blue pull-left">0</span>
        <span class="pull-right">
            <time class="timeago" datetime="<%=post.get('created_at')%>">
            </time>
        </span>
        </td></tr></tbody>

application.js

//= require jquery
//= require jquery_ujs
//= require timeago
//= require underscore
//= require backbone
//= require voice
//= require bootstrap.min
//= require_tree ../templates
//= require_tree ./models
//= require_tree ./collections
//= require_tree ./views
//= require_tree ./routers
//= require_tree .

Is there anyway to get this to work? Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:29:32+00:00Added an answer on June 15, 2026 at 7:29 am

    This is not a function call:

    $(@el).html(@template(posts: @collection)).timeago
    

    That just looks up the timeago function on a jQuery object and, well, does nothing with it. You need to add parentheses (or an argument) to call timeago:

    $(@el).html(@template(posts: @collection)).timeago()
    # you need these ---------------------------------^^
    

    If you were supplying some arguments, you wouldn’t need the parentheses:

    $(@el).html(@template(posts: @collection)).timeago selector: '.pancakes'
    

    The presence of arguments is enough to tell CoffeeScript that you want to execute the function rather than get a reference to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the backbone boilerplate here https://github.com/tbranyen/backbone-boilerplate I do development in static html/js
I'm just starting out with backbone and using the boilerplate ( https://github.com/tbranyen/backbone-boilerplate ). My
Using the Backbone.Rpc plugin [ https://github.com/asciidisco/Backbone.rpc ] I am attempting to send parameters on
I'm using the backbone.layoutmanager project: https://github.com/tbranyen/backbone.layoutmanager#readme can some one please post a sample with
I am using very similar code to the Backbone ToDo example - http://documentcloud.github.com/backbone/docs/todos.html .
I'm using backbone and bootstrapping some data according to practice (http://documentcloud.github.com/backbone/#FAQ-bootstrap). However, now when
a newbe question: I've downloaded the backbone boilerplate from https://github.com/david0178418/BackboneJS-AMD-Boilerplate it uses require.js and
I'm building one page application using Backbone's router to modify browser history. I don't
I am following the tuturoial here: http://backbonetutorials.com/organizing-backbone-using-modules/ and all I would like to do
I'm using backbone.js and rails. When backbone.js saves a model for the first time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.