Skip to content

Releases: tuupola/jquery_chained

Legacy syntax removed

15 Sep 15:20
Compare
Choose a tag to compare

Legacy syntax was removed. Remote version accepts all options including url only as object.

$("#series").remoteChained({
  parents : "#mark",
  url : "/api/series.json"
});

Passed in JSON can now be array of objects.

[
  { "" : "--" },
  { "series-1" : "1 series" },
  { "series-3" : "3 series" },
  { "series-5" : "5 series" },
  { "series-6" : "6 series" },
  { "series-7" : "7 series" },
  { "selected" : "series-6" }
]

Chain to non select inputs

12 Sep 12:37
Compare
Choose a tag to compare

Parent can now be any input. For example text or hidden. If loading has non falsy value clear parameter optional and assumed to be true.

$("#engine").remoteChained({
    parents : "#engine, #model",
    url : "/api/series.json",
    loading : "Loading..."
});

Optionally clear child selects

12 Sep 12:07
Compare
Choose a tag to compare

Possibility to clear child selects before making JSON request. You can also optionally set loading text. This helps to avoid confusion with slower remote requests.

$("#engine").remoteChained({
    parents : "#engine, #model",
    url : "/api/series.json",
    clear : true,
    loading : "Loading..."
});

Trigger less change events

18 Dec 15:21
Compare
Choose a tag to compare

Code now uses a function instead of triggering change event when initializing child selects. Also when updating child select change event will not be triggered if child select value did not change.

Values is now called depends

30 Oct 18:02
Compare
Choose a tag to compare

Rename values setting to more logical depends.

Improved Bower support

26 Oct 20:40
Compare
Choose a tag to compare

Removed unneeded files when installing with Bower.

New syntax and bootstrapping

26 Oct 19:16
Compare
Choose a tag to compare

New alternate but prettier syntax for remote version. Allows you to pass all settings as one hash. Also adds support for bootstrapping selects by passing JSON data in settings. Bootstrapping is used to avoid making the initial AJAX call.

$("#series").remoteChained({
    parents : "#mark",
    url : "/api/series.json",
    bootstrap : {
        "--" : "--",
        "series-3" : "3 series",
        "series-5" : "5 series",
        "series-6" : "6 series",
        "selected" : "series-3"
    }
});

Add possibility to optionally send additional values of non chained inputs when using remote version.

$("#transmission").remoteChained({
    parents: "#engine",
    url: "/api/transmissions.json",
    values: "#model"
});

Also adds support for Zepto and Bower.

Support for Travis and Grunt.

23 Feb 21:07
Compare
Choose a tag to compare

Fix bug #12. Minified versions were missing trailing semicolon. Also support for Travis and Grunt.

Use name instead of id

23 Feb 21:06
Compare
Choose a tag to compare

Remote version now uses name attribute instead id when sending AJAX query.

Improved JSON support

23 Feb 21:05
Compare
Choose a tag to compare

JSON can now also be array of arrays. This enables you to sort items serverside. (Marco Mariani)