j-FloatingInput
- singleton
- supports dark mode
Methods:
Method: component.show(options)
options.element {Element/jQuery Element}options.offsetX {Number}optional,xoffset (default:0)options.offsetY {Number}optional,yoffset (default:0)options.offsetWidth {Number}optional,widthoffset (default:0)options.placeholder {String}optional, a placeholder for search fieldoptions.minwidth {Number}optional, a minimal width, default200options.maxwidth {Number}optional, a maximal width, defaultinfiniteoptions.maxlength {Number}optional, a maximal length of value, default50options.callback(value, element) {Function}is triggered when the user clicks on the itemoptions.icon {String}optional, Font-Awesome iconoptions.close {Function}optional, can determine closing of paneloptions.align {String}optional,left(default),rightorcenteroptions.value {String}optional, a default value for the inputoptions.position {String}optional,top(default),bottomoptions.summary {String}additional help contentoptions.monospace {Boolean}enables monospace fontoptions.select {Boolean}selects text- NEW
options.multiline {Boolean}enables multiline - NEW
options.height {Number}a height for multiline (default:100)
Method: component.hide()
Configuration:
placeholder- a placeholder for the input
Use it with <ui-component name="floatinginput">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<style>
body { background-color: #F0F0F0; }
</style>
<ui-component name="floatinginput" config="placeholder:Type something ..."></ui-component>
<div class="container">
<a href="javascript:void(0)">Type your name</a>
</div>
<script>
$(document).on('click', 'a', function() {
var opt = {};
opt.element = this;
opt.callback = function(value) {
console.log('CLICK', value);
};
SETTER('floatinginput/show', opt);
});
</script>