I want to extend the functionality of my textarea element. The textarea elements should respond when I call a method like this:
$('#jsedit').jsedit();
I know it can be done by doing like this:
$(function() {
$.fn.extend({
jsedit: function() {
alert(this.val());
}
});
});
but how can I specify only the textarea can do this? Because now every element can called jsedit() method.