Calling widget public method from inside onClick function

Calling widget public method from inside onClick function

In my _create method, I add a click method to a class of elements:

  1. $(this.options.tabSelector).find('.tabCollapser').on('click', function () {
  2.             var panelId = $(this).closest('.ui-tabs-panel')[0].id;
  3.             $(this).closest('div.ui-tabs').collapsible('hide', panelId);
  4.         });
Within the finction, "this" applies to the element that was clicked on. I can find the div associated with my widget ($(this).closest('div.ui-tabs')), but when this function executes, it reloads the entire page.

I suspect that calling the widget again may be part of the problem: