Feature Request: Configure Slide on page start
-
Hello,
I played around with your code a bit and have included an option to configure if the carousel should already slide, once you initially visit the page. According to the BootStrap documentation, the data-ride=”carousel” attribute is used to mark a carousel as animating starting at page load.
So I have included an option that will add this attribute to the carousel container based on the option’s value. I had the issue, that although the option was set to false, the carousel was happily ridden anyway, whenever I visited my page. To fix this, I have removed the javascript block entirely. I am also not sure, why you would include this block anyways, because the carousel (also multiple carousels) work(s) fine, if you initialise them with the data-attributes. If I understand the documentation correctly, then calling the carousel from javascript after defining the data attributes is redundant.
Also, I sometimes got an error message stating that the outputbuffer was not filled and could therefore not be emptied. That error is fixed by checking for the length of the ob before emptying it.
Here is a diff that includes my changes.
- The topic ‘Feature Request: Configure Slide on page start’ is closed to new replies.