This is a simple widget mock:
(function ($) {
$.widget(\"ui.myDummyWidget\", {
options: {
},
_create: function () {
},
You can also use the jQuery custom selector to find the widget elements before calling data on them to get the actual widget instance e.g.
$(this.element).find(":ui-myDummyWidget").each(function (index, domEle) {
var widgetObject = $(this).data("myDummyWidget");
widgetObject.hide();
// this == domEle according to the jQuery docs
});
That code finds all of the instances of ui.myDummyWidget (note the change of period . to hyphen - ) that have been created and attached to another widget holder.