... $.fn.annotateEdit = function(image, note) { if (note) { this.note = note; } else { var newNote = new Object(); newNote.id = \"new
Use $.proxy to bind it to a function...
$.proxy
// Returns a function-------v form.find(':radio').change( $.proxy(function() { var vacancy = $(this).attr('value'); mynote.vacancy = vacancy; }, this) ); // ^---- ...that has its "this" value set as this argument.