js: avoid to fire scroll event too often