Programming Tips - JavaScript: How can I pass along "this" ?

Date: 2017jan8 Language: javaScript Keywords: apply, call, bind Q. JavaScript: How can I pass along "this" ? A. Invoke the function with call() or apply(). For example:
$(this).click(function(event) { onClickThing.call(this, dlg, event); // ^^^^ });
function onClickThing(dlg, event) { var thing = $(this).attr('thing'); }