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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:57:53+00:00 2026-06-05T16:57:53+00:00

I just run into another problem with my To-do-like sortable list made with Knockout

  • 0

I just run into another problem with my To-do-like sortable list made with Knockout and Knockout-sortable plugin.

I need to put a red delimiter under the element placed in the current time and cancel the sort if a element is dropped before that delimiter.

I tried with a “visible” binding and it works in some way, but the visibile binding just hide the DOM element and it mess up the sortable arrayIndex, adding unnecessary element to it.

<div class="delimiter" data-bind="visible: time() == $root.limit()"></div>

The “if” binding would be better because it insert DOM element only if necessary, but the expression I used with visible is always evaluated to true and I can’t figure out why…

<div class="delimiter" data-bind="if: time() == $root.limit()"></div>

Here is the fiddle: http://jsfiddle.net/ingro/VaqqF/

Any help is appreciated, thank you!

  • 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-05T16:57:56+00:00Added an answer on June 5, 2026 at 4:57 pm

    You’ve simply misunderstood the if-binding: It removes the content of the node it has been applied to, not the node itself. If you want to remove a node without creating a wrapper around it (that you can use to add the binding), there is also the comment-version of the if-binding, called the containerless control flow syntax:

    <!-- ko if: time() == $root.limit() -->
      <div class="delimiter"></div>
    <!-- /ko -->
    

    http://jsfiddle.net/VaqqF/11/

    Ref: http://knockoutjs.com/documentation/if-binding.html

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

Sidebar

Related Questions

I've just run into a problem with my ISP who it seems refuses to
I've just installed VS2008 and have run into a problem that I'm sure can
I've run into a really annoying problem, and I'm hoping it's just a setting
I've run into a problem where the TargetUpdated event seemed like it would be
Ok, I have just run into something that is really catching me off-guard. I
Do you ever run into a bug where you are just out of ideas
I'm just learning the ins and outs of MYSQL queries but I've run into
I've run into a problem with Ajax lately. I'm working on a frontend of
I've run into reoccuring problem for which I haven't found any good examples or
I have run into a problem in one of my Tcl scripts where I

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.