jquery $.proxy and $.on functions
<p>I wanted to generalize my javascript plugin, the code (taken from bootstrap's tooltip plugin and changed a little bit):</p>

<pre><code>!function ($) {

   "use strict"; // jshint ;_;

   var Conversation = function (element, options) {
      this.init('conversation', element, options);
   };

   // PROTOTYPE DEFINITIONS

   Conversation.prototype = {

      constructor: Conversation,

      init: function (type, element, options) {

         this.type = type;
         this.$element = $(element);
         this.options = this.getOptions(options);
         var $that = $(this);


         this.$element.find('[data-toggle]').on('click', /*HERE*/);

      },

      getOptions: function (options) {
         return $.extend({}, $.fn[this.type].defaults, options, this.$element.data());
      },

      starConversation: function(e){

          console.log('starConversation called!');
      },

      selectConversation: function(e, arg){

         console.log('selectConversation called!');

      },

      selectAllConversations: function(e){
         console.log('selectConversation called!');
      }

   };


   $.fn.conversation = function ( option ) {
      return this.each(function () {
         var $this = $(this)
            , data = $this.data('conversation')
            , options = typeof option == 'object' &amp;&amp; option;
         if (!data) $this.data('conversation', (data = new Conversation(this, options)));
         if (typeof option == 'string') data[option]()
      })
   };

   $.fn.conversation.Constructor = Conversation;

   $.fn.conversation.defaults = {
      selectAllButtonSel: '#selectAll'
   };


}(window.jQuery);
</code></pre>

<p>the problem is I wanted to generify like "all elements having data-toggle should call the function which is named the same as their data-toggle attribute". </p>

<p>Normally,</p>

<pre><code>this.$element.find('[data-toggle]').on('click', $.proxy(this['starConversation'], this));
</code></pre>

<p>works. But I wonder whether I can reach clicked element's data-toggle attribute inside <code>this['starConversation']</code>. I tried also this:</p>

<pre><code>$.proxy($that[$(this).data('toggle')], $that);
</code></pre>

<p>however <code>$that</code> variable somehow do not have <code>starConversation</code> function variable. Is scope is changed inside <code>$.proxy</code> function (or because of <code>on()</code> function)? I do not want to break the plugin pattern here. Is it possible?</p>
