make gauges work with ajax