First of all, replace() is a javascript function, and not a jquery function.
The above code replaces only the first occurrence of "." (not every occurrence). To replace every occurrence of a string in JavaScript, you must provide the replace() method a regular expression with a global modifier as the first parameter, like this: 
"11.111.11".replace(/\./g,'')