With
$.fn.customFunction = function(){};
we can extend whole jQuery and use it with:
$('body').customFunction();
Is it possible to extend only specified element like:
var elem = $('#elem');
elem.fn.customFunction = function(){};
elem.customFunction(); // function is called
$('body').customFunction(); // this call should cause error