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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:04:56+00:00 2026-05-28T15:04:56+00:00

I am struggling to get a list created by Ember.js sortable using jQuery.ui. The

  • 0

I am struggling to get a list created by Ember.js sortable using jQuery.ui.

The controller looks like this:

App.ThingyController = Ember.ArrayController.create
  content: [
    { name: 'Item1' },
    { name: 'Item2' }
  ]

and the template like this:

<script type="text/x-handlebars">
  {{#collection contentBinding="App.ThingyController" tagName="ul" id="sortable"}}
    {{content.name}}
  {{/collection}}
</script>

My questions are:

  • Where do I best call the sortable() function on the ul “#sortable”? Is there an event on the controller and a handle to the rendered HTML element that I can use?

  • How to I connect the jQuery.ui callbacks to the Ember.js controller? Like, say, to send the updated list to the server via ajax?

All of this can be done circumventing the Ember.js abstraction, but I want to do it the “right way”.

Or is the whole concept flawed and Ember.js provides for a “sortable” function without jQuery.ui?

  • 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-05-28T15:04:58+00:00Added an answer on May 28, 2026 at 3:04 pm

    you could probably implement Em.View#didInsertElement [1] where you can be sure that the dom element is created and inserted into the body. this would be where you call $.sortable:

    App.MySortableView = Em.CollectionView.extend({
      tagName: "ul",
      didInsertElement: function() {
        this.$().sortable()
      }
    })
    

    the template:

    {{#collection "App.MySortableView" ...}}
      ...
    {{/collection}}
    

    (i didn’t try this code but i dont see why it shouldn’t work…)

    [1] https://github.com/emberjs/ember.js/blob/master/packages/ember-views/lib/views/view.js#L738

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

Sidebar

Related Questions

I'm struggling a bit with this. I want to get the list of ids
OK, struggling to get a definitive answer to this one... I have an application
I'm trying to make some text bold using HTML, but I'm struggling to get
I'm struggling with the following problem. I use the jQuery autocomplete plugin to get
I've been struggling for quite a while to get this feature working: I want
I have created a type list. I then create a class using a template
This may seem like a very simple question, but I have been struggling with
I am struggling with the code when I run it I get this error.
I'm getting this run-time error and I'm really struggling to get to the bottom
I'm new to this libcurl stuff and struggling trying to get directory content of

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.