/ Published in: JavaScript
Expand |
Embed | Plain Text
//The name will be alertVal jQuery.fn.alertVal = function() { var element = $(this[0]); //That's our element if (element.val()) alert(element.val()); //That's our element's value }; //This is the way we can use it $("selector").alertVal();
You need to login to post a comment.
