Getting error when I use $(this) in jQuery callbacks

Getting error when I use $(this) in jQuery callbacks

Hi for all,

I am getting an error "TypeError: handleObj.handler.apply is not a function" when running for the second time the instruction below.

  1. $('.dock').find("a").on("click", function(event){   
        _handler($(this), event); // Error in a second time $(this)...
        return;
    });
           
    var _handler = function( handleObj, event ) {   
        ...
        Content.createNewTab( handleObj, tabSize, true );
    }

    createNewTab: function ( obj, size, checkTabExists ) {
        ...
    }













I found an article on the link this and $(this) in jQuery callbacks which explains why this occurs.

Any suggestions on how I could solve this?

Regards