PHPackages                             thatsus/jquery\_chained - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. thatsus/jquery\_chained

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

thatsus/jquery\_chained
=======================

v1.0.2(10y ago)040JavaScript

Since Sep 1Pushed 10y ago1 watchersCompare

[ Source](https://github.com/thatsus/jquery_chained)[ Packagist](https://packagist.org/packages/thatsus/jquery_chained)[ RSS](/packages/thatsus-jquery-chained/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Chained
=======

[](#chained)

[![Author](https://camo.githubusercontent.com/b82ff4b35baf0280d673bfc9567e82f8eccf1e4ef1819a0ce4790231cd7d9322/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d40747575706f6c612d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/tuupola)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/f0915f08d28429766e15bfe5f26b68daa98ddf02eb800cbe243501f17872dfa5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f747575706f6c612f6a71756572795f636861696e65642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tuupola/jquery_chained)

Chained is simple plugin for chained selects. It works with both jQuery and Zepto. You can choose from two different versions. Use jquery.chained.js if you do not want to make external queries for setting content of child selects. This version uses classnames of select options to decide content.

For more complex scenarios maintaining option tag classnames will get cumbersome. Also if you want to make queries against database use jquery.chained.remote.js instead. This version makes an external AJAJ query and uses the returned JSON to build child selects.

Install
-------

[](#install)

You can install with [bower](http://bower.io/) or [npm](https://www.npmjs.com/).

```
>bower install chained
>npm install jquery-chained

```

Simple usage
------------

[](#simple-usage)

Child selects are chained to parent select. All selects must have an id attribute. Child select options must have class names which match option values of parent select. When user selects something in parent select the options in child select are updated. Options which have matching classname with parents currently selected option will stay visible. Others are hidden.

First you must include jQuery or Zepto and Chained in your code:

```

```

If you are using Zepto you must also include the optional selector module.

```

```

Then lets assume you have the following HTML code:

```

  --
  BMW
  Audi

  --
  3 series
  5 series
  6 series
  A3
  A4
  A5

```

You can now chain the series to mark. There are two different ways to do it. Choose yourself if you prefer more english like or shorter version. I prefer the shorter version.

```
$("#series").chained("#mark"); /* or $("#series").chainedTo("#mark");
```

Chaining to multiple parents
----------------------------

[](#chaining-to-multiple-parents)

One child can have two parents. Available options in child which chained to multiple parents depend on one or both of the parents selected values. To make child select depend on values of both parents use classname like `first\second`.

Here is code for fourth select. Note how diesel engine is available only for BMW 3 and 5 series Sedans. This is achieved by using classnames `series-3\sedan` and `series-5\sedan`.

```

  --
  2.5 petrol
  3.0 petrol
  3.0 diesel

```

```
$("#series").chained("#mark");
$("#model").chained("#series");
$("#engine").chained("#series, #model");
```

Usage with AJAX
---------------

[](#usage-with-ajax)

For instructions on how how to build selects using JSON data, see the [project homepage](http://www.appelsiini.net/projects/chained).

License
=======

[](#license)

All code licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

Changelog
=========

[](#changelog)

See [releases](https://github.com/tuupola/jquery_chained/releases).

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3958d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb711bf9c5107c5de3104691c826c451390970e7f4500a66b9f384efadc7d351?d=identicon)[thatsus](/maintainers/thatsus)

---

Top Contributors

[![tuupola](https://avatars.githubusercontent.com/u/21913?v=4)](https://github.com/tuupola "tuupola (158 commits)")[![brendon](https://avatars.githubusercontent.com/u/81871?v=4)](https://github.com/brendon "brendon (2 commits)")[![thiagotalma](https://avatars.githubusercontent.com/u/612578?v=4)](https://github.com/thiagotalma "thiagotalma (2 commits)")[![kolibrie](https://avatars.githubusercontent.com/u/453810?v=4)](https://github.com/kolibrie "kolibrie (1 commits)")[![thatsus-master](https://avatars.githubusercontent.com/u/16006839?v=4)](https://github.com/thatsus-master "thatsus-master (1 commits)")

### Embed Badge

![Health badge](/badges/thatsus-jquery-chained/health.svg)

```
[![Health](https://phpackages.com/badges/thatsus-jquery-chained/health.svg)](https://phpackages.com/packages/thatsus-jquery-chained)
```

###  Alternatives

[bit3/git-php

Easy to use GIT wrapper for PHP.

47145.5k6](/packages/bit3-git-php)[defstudio/enum-features

A simple trait to enable a feature system using Enums and Laravel Pennant

162.2k](/packages/defstudio-enum-features)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
