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 7813697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:57:47+00:00 2026-06-02T04:57:47+00:00

I have started looking into Backbone.js and I seem to be having trouble figuring

  • 0

I have started looking into Backbone.js and I seem to be having trouble figuring out how to implement a highlight mode for incomplete events in a todo list.

jsFiddle.

Each todo item has a checkbox that maps to its models completed attribute.

I have a button called Highlight Incomplete which I wanted to add a class to each item’s li of which its model’s completed attribute is false. I wanted it to toggle this mode, so one click highlights them and the next click removed all highlighting.

I wrote a filter on the model’s collection to return these incomplete items. I thought I could use this, but I got stuck trying to figure it out.

I didn’t want to add another attribute called highlighted to the model as it can be inferred from its completed attribute and it would only exist for its visual representation.

It should also be live, so if you have highlight mode on and add some new elements, they should be highlighted.

How can I do this?

  • 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-02T04:57:48+00:00Added an answer on June 2, 2026 at 4:57 am

    If you structure your CSS to match your html heirarchy, and have your model states constantly updated, you won’t have to worry about syncing issues: http://jsfiddle.net/PnSPH/5

    This fiddle handles the check box state: http://jsfiddle.net/PnSPH/6/

    An alternative would be to stick with just having .render(), but have the template handle the class and checked status

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

Sidebar

Related Questions

I have recently started looking into using Azure but I'm having some issues getting
My company recently purchased TFS and I have started looking into the code analysis
I have recently started looking into Google Charts API for possible use within the
looking at dribbble, I have started to ask myself, how I would implement a
I have recently started looking into MQs and I had some very basic questions,
I have just started looking into .net MVC and I really like it. There
I'm not experienced with sitemaps - only just started looking into them. I have
I have started looking into iPhone game programming. I want to build a game
I've just recently started looking into the details of which events fire when in
I have just started looking into msbuild, because I want to make my own

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.