Skip to content

Instantly share code, notes, and snippets.

@kirantemojo
Last active December 24, 2015 22:39
Show Gist options
  • Save kirantemojo/6874480 to your computer and use it in GitHub Desktop.
Save kirantemojo/6874480 to your computer and use it in GitHub Desktop.
jkefexMultiSortSel jQuery Plug-in
<!DOCTYPE html>
<html>
<head>
<title>Channel</title>
<link rel="stylesheet" href="bootstrap.min.css">
<style>
#optSel {
padding: 10px;
}
#footer{
margin-top: 400px;
}
</style>
</head>
<body>
<center>
<h6>jQuery Multi-Sorting Plugin</h6>
<input id="equipitems" type="hidden" value=",100,200,300,400,500,600">
<div id="optSel">
<select name="options-1" id="row-1" class="selectpicker">
<option value=""></option>
</select>
<select name="options-2" id="row-2" class="selectpicker">
<option value=""></option>
</select>
<select name="options-3" id="row-3" class="selectpicker">
<option value=""></option>
</select>
</div>
</center>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://kiranml1.github.io/demos/jkefexMultiSortSel/js/jkefexMultiSortSel.js""></script>
<script>
var data = $('#equipitems').val();
var values = data.split(',');
$('#optSel').jkefexMultiSortSel({data:values,empty:true,selElem:'row'});
</script>
</body>
</html>
@kirantemojo
Copy link
Author

Usage:
$('#optSel').jkefexMultiSortSel({data:values,empty:true,selElem:'row'});

data - data to be passed to the Plugin

empty - to be empty or not

selElem starting letter for Reg Exp Matching

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