JSFiddle - React, Tailwind, and code Playground

by Nick Craver

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<p>Test</p>

JavaScript

(function($){
    $.fn.myPlugin= function(options, callback) {
        return this.each(function(){
                $(this).click(function(){
                      // some plugin works ..
                      callback.apply(this);
                });
        });
    };

})(jQuery);
$('p').myPlugin({
      // Some options
}, function(){
      alert('first test');
      alert($(this).text());
});