I am creating a prototype with its event listeners and their respective handlers.
The issue is that I need two 'this' in the same handler:
this._items = $(".playlist-item");
//...
this._items.click( this.itemClickedHandler( ?? ) );
In other handlers where only the instance was needed this used the bind method:
this._player.on('ended', this.videoEndedHandler.bind(this))
At the moment I left the code, so that at least it worked, like this:
var that = this;
this._items.click(function(){
var index = $(this).data("slick-index");
that.jumpTo(index);
});