Skip to content

Lightweight javascript to transform input seelect to list items button action android/ios design

License

Notifications You must be signed in to change notification settings

nanoblocktech/selecty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Setup

<script src="path/js/jquery.min.js"></script>
<script src="path/js/selecty.min.js"></script>
<link rel="stylesheet" href="path/css/selecty.min.css">
$selector = $('selecty').Selecty();

$selector.on('selecty:created', function () {
	console.log("created");
}).on('selecty:opening', function () {
	console.log("Opening");
}).on('selecty:open', function () {
	console.log("Open");
}).on("selecty:select", function(e, data) {
	console.log(data.value, data.text);
}).on("selecty:closing",function(){
	console.log("closing");
}).on("selecty:close",function(){
	console.log("Close");
});

Public methods

$selector.Selecty('open');
$selector.Selecty('close');
$selector.Selecty('destroy');
$selector.Selecty('add', "key", "Value");
$selector.Selecty('remove', "key");

Options

{
 	dropdownParent: $('body'),
	theme: 'full',
	width: '100%',
	multiple: false,
	dropdownCssClass: '',
	selectionCssClass: '',
	title: '',
	closeText: 'Close',
	placeholder: 'Option',
	template: function (option) {
		return option.text;
	},
	initialOptions: []
}

About

Lightweight javascript to transform input seelect to list items button action android/ios design

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published