JSFiddle - React, Tailwind, and code Playground
by Alexandre Simoes
HTML
<h2>Normal controls</h2>
<input id="txt1" type="text" >
<input id="txt2" type="text" >
JavaScript
(function( $ ){
$.fn.autocomplete = function(options) {
// Create some defaults, extending them with any options that were provided
var settings = $.extend( {
'location' : 'top',
'background-color' : 'blue'
}, options);
return this.each(function() {
$(this).val('wwww');
});
};
})( jQuery );
$('input').autocomplete();