I'm using impress.js for a presentation and instead of using it for fancy stuff, I just want the slides to be 900px apart from each other. I may need to add/delete slides depending on the length of my presentation and instead of changing each data-y value, I'd like to use jQuery to loop through each of my slides and add 900px to each slide position. Here's the jQuery I'm using:
var counter = 0;
$('.slide').each(function(){
var posY = counter * 900;
$(this).attr("data-y", posY);
counter++;
});
But it's not adding the value to the data-y attribute in my html. I believe the code is right, I'm just not sure why it's not working.