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

  • Home
  • SEARCH
  • 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 7725973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:05:34+00:00 2026-06-01T05:05:34+00:00

I’m hoping someone can help me with a backbone.js question. I’ve got most of

  • 0

I’m hoping someone can help me with a backbone.js question. I’ve got most of it working but I’m puzzling over aspects of the architecture.

I’ve got a set of results that populate a ‘table’ (it’s actually an unordered list for easier DOM manipulation with more reliable rendering); the results can be filtered via some sliders and checkboxes. I’ve decided that the filtering will simply hide some of the ‘rows’ rather than have the whole ‘table’ redraw.

So with backbone this is a collection of models – all good and working fine so far.

What I want to do is allow people to select (with a checkbox) individual ‘rows’ of the ‘table’ (actually LIs) and have them move themselves into a shortlist area at the top of the page. I’ve achieved this visually by using jQuery .slideOut in the main ‘table’ and then using .slideIn on a .clone of the LI in a separate UL above the main ‘table’. From a UX point of view this all works nicely.

However, I think I’m going wrong by cloning the ‘row’ because the clone is no longer a backbone model and if a user wants to remove it from the shortlist by unchecking it then it must go back into the ‘table’; at this point I don’t know how to tell the model in question to unhide itself because I don’t know how to invoke the model when all I have is the LI as a jQuery object.

Anyway, this feels wrong. Shouldn’t I be somehow displaying the selected models of the collection in the top UL and the unselected ones in the bottom UL? How would I go about doing that? Or do I need two collections and I move models from one to the other?

I feel I’m missing something obvious and would love some help! Thanks in advance for any feedback.

qryss

  • 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-01T05:05:36+00:00Added an answer on June 1, 2026 at 5:05 am

    I think you can make two collections :

    • one for the table ( e.g. tableCollection ) with all models in it, and
    • one for the selected rows (e.g. selectedCollection ) from the table filled only with the selected models.

    So you should have two triggers in the your table view :

    • On selected row : add the selected model to your selectedCollection
    • On delselect row : remove the selected model from your selectedCollection

    And now when you destroy a model in your main collection ( tableCollection ) the model is also removed from you selectedCollection ( if exists there ).

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

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.