Why doesn\'
$.fn.extend({ id : function() { return this.attr('id'); } }); alert( $('#element').id() );
Some checking code required of course, but easily implemented!