Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion numeric/jquery.numeric.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ $.fn.numeric.keypress = function(e)
allow = false;
}
}
//if the key pressed is '.' and the decimal symbol is not present yet, add it to the field.
else if(decimal && key == 46 && $.inArray(decimal, value.split('')) == -1){
$(this).val($(this).val() + decimal);
}
}
else
{
Expand All @@ -157,7 +161,6 @@ $.fn.numeric.keypress = function(e)
allow = false;
}
}

}
return allow;
};
Expand Down