JSFiddle - React, Tailwind, and code Playground
by lupos
HTML
<div id="shakeMe">words</div>
JavaScript
(function($) {
$.fn.shake = function(options) {
var defaults = {
unit: "px",
width: 100,
height: 100,
top: 0,
left: 0
}
var options = $.extend(defaults, options);
return this.each(function() {
var $this = $(this);
//above makes this viable $('div').myPlugin().css('color', 'red');
var shake = function() {};
//var function2 = function() {};
});
};
})(jQuery);
$(document).ready( function(){
$('#shakeMe').shake({width :50, unit : "%"});
});