I have found the solution (and it is somewhat based on Qamal's suggestion for assigning. thanks Qamal!)
Solution is to declare variable for new function, nested inside "main one" and to bind that one as event handler. Also to add call to that nested function when "main one" is called. jQuery.dataTableHandler = function(param1, param2, param3) { var dataTableHandlerFunction = function(param1, param2, param3) { $.ajax({ method: "post", data: ({newparam1: param1, newparam2: param3}), urL: "../somepath", success: function(returnedData) { $("someDiv1").html(returnedData); }, complete: function(xhr, status) { $.("someDiv2").bind("click", function(e) { dataTableHandlerFunction(param1, param2+1, param3) ; <!-- here is the problem }); } }); } //main executes dataTableHandlerFunction(param1, param2, param3); } -- View this message in context: http://old.nabble.com/Function-to-bind-itself-to-some-element-tp26252246s27240p26258399.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.