Need help figuring out how to utilize sort library


I’m new to Meteor and Javascript.

I’m trying to implement the sort library found here:

I know this is probably simple, but the simpliest invocation of the code here: {{sortable <collection|cursor|array>}}

still leaves me a bit baffled. I’ve tried passing collections like:

{{sortable PlayersList}} but, have no idea what the output is supposed to be, or how I am supposed to handle it.

I learn by example, can someone help me out by showing me how to use the simpliest implementation of the library?

This is my first time posting on a forum in a long time. I usually can Google-Fu my way around.



I figured it would help if I included my code.


  <h1>Welcome to Meteor!</h1>

  {{> hello}}

<template name="hello">
  {{#each showplayers}}
    <li>{{name}}: {{score}}</li>

  {{#sortable showplayers}}
    <li>{{name}}: {{score}}</li>



Welcome to Meteor!

Bob: 0
Larry: 0
Henry: 0


Added meteorpad for reference here:


Removed the {{#each name}} block and worked for me


You rock. Thanks! I’ve been banging my head trying to get it to work.


You’re welcome, have fun :grin: