correctly fetch data attributes for slider
updated version