This is a simple widget mock:
(function ($) {
$.widget(\"ui.myDummyWidget\", {
options: {
},
_create: function () {
},
There is also a method created when a Widget is defined, you can simply call the instance method to get the actual Widget instance like so:
//Create the Instance
$("#elementID").myDummyWidget(options);
//Get the Widget Instance
var widget = $("#elementID").myDummyWidget("instance");
Or you can do it as a one-liner:
var widget = $("#elementID").myDummyWidget(options).myDummyWidget("instance");