Skip to content

braindawg/jquery-transfer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A jQuery plugin that is a shuttle box.

Preview

snapshot01

snapshot02

snapshot03

snapshot04

snapshot05

snapshot06

snapshot07

options

option description type default
itemName The name of each item in the data string item
groupItemName The name of each group in the data string groupItem
groupArrayName The name of the data array for each group string groupArray
valueName The value name of each item in the data string value
tabNameText The left tab text string items
rightTabNameText The right tab text string selected items
searchPlaceholderText The searcher's placeholder text string search
totalText The total text string total
dataArray items data array array
groupDataArray grouping item data array array

Usage

grouping

var groupDataArray = [
    {
        groupItem: "China", 
        groupArray: [
            {
                item: "Beijing", 
                value: 1
            },
            {
                item: "Shanghai", 
                value: 2
            }
        ]
    },
    {
        groupItem: "Japan",
        groupArray: [
            {
                item: "Tokyo", 
                value: 6
            }
        ]
    }
];
var settings = {
    groupDataArray: groupDataArray,
    callable: function (items) {
        // your code
    }
};

var transfer = $(".transfer").transfer(settings);
// get selected items
transfer.getSelectedItems();

no grouping

var dataArray = [
    {
        item: "Beijing", 
        value: 1
    },
    {
        item: "Shanghai", 
        value: 2
    },
    {
        item: "Tokyo", 
        value: 6
    }
];
var settings = {
    dataArray: dataArray,
    callable: function (items) {
        // your code
    }
};

var transfer = $(".transfer").transfer(settings);
// get selected items
transfer.getSelectedItems();

About

☑️ A jQuery plugin that is a shuttle box

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.1%
  • CSS 26.0%
  • HTML 6.9%