JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test">Testing highlight</div>
JavaScript
(function($) {
$.fn.map = function(options) {
var settings = {
'color' : null
};
if (options) {
$.extend(settings, options);
}
$.fn.map.testing = function() {
alert('oh hi');
}
this.css('background-color', settings['color']);
}
})(jQuery);
$(function() {
$('#test').map({color: 'red'});
$.fn.map.testing();
});