fix slide element lookup in js