Budapest Table Sorting Plugin

Posted by Dan on June 18, 2011 in Tutorials |

Budapest is a jQuery plugin that allows for simple table sorting. It allows the developer to have full control over the sorting.

Basic usage:

$("table").budapest();

Advanced usage:

$("table").budapest({
  headers: {
    0: { sortable: true},
    1: { sortable: true},
    2: { sortable: true}
  },
  sortIndex: 2,
  sortDirection: "asc",
  onSort: function(index, val1, val2, direction){
    //provide your own sorting algorithm for each column!
    //must return either -1, 0, or 1
  },
  onSorted: function(index, direction){
  //this event is fired after each sort!
  }
});

Check out the full documentation.

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Copyright © 2010-2012 Dan Appleyard All rights reserved.
Desk Mess Mirrored version 1.9 theme from BuyNowShop.com.

Load Times Plugin made by Cheap Web Hosting