Changed div to span in replace method