Team 1

Team 2

jQuery Kanban: Multiple Kanbans

jQuery Kanban Widget with Multiple Kanbans.

A live JavaScript/jQuery example of jqxKanban, the jQWidgets Kanban component, with its complete source code below. It is one of 10 jqxKanban demos for jQuery.

jqxKanban API used in this demo

Source code

To run it in your own page, load jqx.base.css, a theme and the library files below from npm (npm install jqwidgets-scripts) or the jsDelivr CDN, then add the markup and the script. jQuery is not required: jqxcore.js provides $. Getting started with jqxKanban shows the setup step by step.

The page loads jqx.base.css, a theme and these library files: jqxcore.js, jqxsortable.js, jqxkanban.js.

It also loads helper scripts of this demo site, which are not part of the library: data.js, demos.js (getWidth() and other layout helpers).

script.js

$(document).ready(function () {
    var staff = [
     { id: 0, name: "No name", image: "../../jqwidgets/styles/images/common.png", common: true },
     { id: 1, name: "Andrew Fuller", image: "../../images/andrew.png" },
     { id: 2, name: "Janet Leverling", image: "../../images/janet.png" },
     { id: 3, name: "Steven Buchanan", image: "../../images/steven.png" }
    ];

    var kanbanColumns = [
            { text: "Backlog", dataField: "new", access: "none", maxItems: 5 },
            { text: "In Progress", dataField: "work", access: "none", maxItems: 5 },
            { text: "Done", dataField: "done", access: "none", maxItems: 5, collapseDirection: "right" }
    ];
    var kanbanSourceConnected1 = [
                        { id: 3, status: "done", text: "Combine Orders", tags: "orders, combine", color: "#5dc3f0", resourceId: 3 },
                        { id: 4, status: "work", text: "Change Billing Address", tags: "billing", color: "#6bbd49", resourceId: 1 },
                        { id: 5, status: "new", text: "One item added to the cart", tags: "cart", color: "#5dc3f0", resourceId: 3 },
                        { id: 6, status: "work", text: "Login 404 issue", tags: "issue, login", color: "#6bbd49" }
    ];

    var kanbanSourceConnected2 = [
                        { id: 0, status: "new", text: "State opened does not contain items", tags: "state, open", color: "#5dc3f0", resourceId: 1 },
                        { id: 1, status: "done", text: "Patch #2043", tags: "patch", color: "#6bbd49", personId: 2},
                        { id: 2, status: "work", text: "Change payment method", tags: "payment", color: "#6bbd49", resourceId: 2 }
    ];


    $('#kanban').jqxKanban({
            width: 400,
            height: 400,
            source: kanbanSourceConnected1,
            connectWith: "#kanban2",
            columns: kanbanColumns,
            resources: staff
    });
    $('#kanban2').jqxKanban({
            width: 400,
            height: 400,
            source: kanbanSourceConnected2,
            connectWith: "#kanban",
            columns: kanbanColumns,
            resources: staff
    });
});

body.html

<div id="outerBox1">
    <h2>Team 1</h2>
    <div id="kanbanBox1">
        <div id="kanban"></div>
    </div>
</div>
<div id="outerBox2">
    <h2>Team 2</h2>
    <div id="kanbanBox2">
        <div id="kanban2"></div>
    </div>
</div>
<div class="clearing"></div>

Learn more

More jQuery Kanban demos