JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

(function($) { 
    var me = {
        doSomething: function(id){
            this.doSomethingElse('test');
            this.doSomethingElse('test2');
        },
        doSomethingElse: function(str){
            alert(str);
        }
    };
    $.fn.myMethod = function() {
      return this.each(function(){
        me.doSomething(jQuery(this).attr("id"));
      });   
    };
})(jQuery);


$("div").myMethod();