I need to search an input\'s value for all street abbreviations and replace with appropriate suffix. This is what I have so far:
jQuery(\'#colCenterAddress\'
var valArray = val.split(" "); for(x = 0; x < valArray.length; x++){ for(y = 0; y < r.length; y ++){ if (valArray[x] == f[y]){ valArray[x] = r[y]; } } } return valArray
You could always turn the array back into a string for the return if you like.
Demo: http://jsfiddle.net/vRTNt/12/