I am looking at the jquery watermark plugin and i cant seem to understand whats going on… First off what does the fn mean and where is WatermarkColor being defined…ins not in this file
$.fn.Watermark = function(text,color) {
if(!color)
color="#2D2D2D";
return this.each(
function(){
var input=$(this);
var defaultColor=input.css("color");
map[map.length]={text:text,obj:input,DefaultColor:defaultColor,WatermarkColor:color};
function clearMessage(){
if(input.val()==text)
input.val("");
input.css("color",defaultColor);
}
fnis a shortcut toprototypethat jQuery sets up.WatermarkColoris whatever color is entered into theWatermarkfunction, or it defaults to#2D2D2D.