increased efficiency of for loop by storing number of sliders in an empty div's data-attribute