jeudi 23 juillet 2015

TinySort.js - Sort by checkbox value?

I'm trying to sort a list of divs based off the contained checkbox value. I want to do something like this, but is: "" does not seem to be supported in TinySort (attr: "" and data: "" work but I can't get them to work with the checkbox value):

tinysort('div.list', { selector: 'input[type=checkbox]',is: ":checked"});

I can sort based off a data value of the checkbox with the following code:

tinysort('div.list', { selector: 'input[type=checkbox]', data: 'task-id' });




Aucun commentaire:

Enregistrer un commentaire