Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort by value (indexed) #8

Open
GoogleCodeExporter opened this issue Aug 12, 2015 · 0 comments
Open

sort by value (indexed) #8

GoogleCodeExporter opened this issue Aug 12, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Script:

$(document).ready(function() {
                        var options = {choose: 'Katalog...', select_class: 'vertical', indexed: true, set_value_on: 'each', on_each_change: 'http://domain.tld/json_pbekatalog.php', loading_image: '/images/ajax_load.gif'};
                        $.getJSON('http://domain.tld/json_katalog.php', function(tree) { // initialize the tree by loading the file first
                            $('input[name=lnr]').optionTree(tree, options); // .change(displayParents)
                        }); 
                    });


json_katalog.php result:
{"52":"Allgemeines","5":"Bernstein"}

The json data is sorted alphabeticaly by the value. 
- Allgemeins
- Bernstein

The optiontree will sorted by the key 
- Bernstein
- Allgemeines´

How can i display the results in the optiontree as it will be in the json data 
without resorting! Or sort by value?

Version 1.3

Original issue reported on code.google.com by [email protected] on 18 Jan 2012 at 2:57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant