I am trying to use this block of code to replace ALL "123"'s in a long string with a different number.
var new_id = new Date().getTime();
$('#food').after(
"<div id='123' name='123'> etc etc".replace('123', new_id)
);
But it's only replacing the first 123 with the new_id. Is there a way to replace all of them?