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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:08:50+00:00 2026-06-15T08:08:50+00:00

I am trying to get knockout mapping plugin working with Ryan Niemeyer’s sortable plugin

  • 0

I am trying to get knockout mapping plugin working with Ryan Niemeyer’s sortable plugin and am not having success. In my example if you try to sort an item into the middle of the list then it always puts it at the bottom. Sorting to the top of list works, but if you try to sort an item to anywhere else besides the top it will automatically go to the bottom of the list.

Example:
http://jsfiddle.net/thebassix/cKX53/1/

Here’s my html:

<div id="results">
            <h3>Tasks</h3>
            <ul data-bind="sortable: series">
                <li data-bind="text: Name"></li>
            </ul>
        </div>​
  • 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-15T08:08:51+00:00Added an answer on June 15, 2026 at 8:08 am

    The issue looks like it is related to the mapping plugin turning your _destroy property into an observable. The functionality in Knockout core and in the sortable plugin that deals with _destroy expects it to be a plain property.

    The mapping plugin does have a copy option that you can use to simply copy a property rather than create an observable. However, this only seems to work on the top-level properties, so if you are passing in an array directly, then you would probably need to setup your mapping options like:

    var mappingOptions = {
        create: function(options) {
            return ko.mapping.fromJS(options.data, { copy: '_destroy' });
        }            
    };
    

    Sample: http://jsfiddle.net/rniemeyer/9UGKQ/

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

Sidebar

Related Questions

I am trying to get an example of Knockout working in JsFiddle. JsFiddle Here:
I am trying to get knockout.js to update my view after an ajax call
I'm trying to use knockout and jquerymobile and can't get it to work. Here's
I am trying get this ListView working and i'm trying to sort the list
I'm kind of new to backbone coming from knockout.js and I'm trying to get
i'm quite new to knockout plugin and i'm trying to build a commentthread with
I am trying get all maping information for a specific workspace. When I try
I am trying to learn knockOut.js and can't really get off the ground. When
I'm working with knockout.js to build dynamic lists and I'm trying to figure out
So i am trying get 2 div-containers which both should contain centered text (Both

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.