How to get the id on an object, i know the id is hola, but i need to get it during runtime
alert($('#hola').id);
The idea is this:
<script>
(function ($) {
$.fn.hello = function(msg) {
alert('message ' + msg);
alert('is from ' + this.id); // this.id doesn't work
};
})(jQuery);
$('#hola').hello('yo');
</script>