Replace default behaviour with ajax.