You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use Waterwheel Carousel within Drupal. I embedded the div and images directly in a page with full html chosen. I did not think about that drupal automatically inserts br-tags for new lines. So my problem appeared that right part of the carousel was not shown at all and there was also some javascript errors given.
Tracking the error down finally got me to the point I realized that the total item count was nearly doubled, which then led me to the br-Tags included by Drupal.
Although someone could avoid this by just removing the br-Tags, it could also be worth thinking about whether to limit the total item count to img-Tags. Therefore I changed line 34 in jquery.waterwheelCarousel.js to this:
totalItems: $(carousel).children("img").length,
instead of previously having
totalItems: $(carousel).children().length,
I think this could make sense, maybe if someone wants to add for any reason some other elements in the carousel-div.
On the other side, I do not know if other items than images can also be rotated. If this is the case the proposed change will not be right. Than maybe a class selector could do the job.
I leave it to you Brian, whether you find this useful or not.
Just wanted to give this feedback, if maybe anyone else has the same experience.
Waterwheel is really great stuff, I like it very much.
The text was updated successfully, but these errors were encountered:
I tried to use Waterwheel Carousel within Drupal. I embedded the div and images directly in a page with full html chosen. I did not think about that drupal automatically inserts br-tags for new lines. So my problem appeared that right part of the carousel was not shown at all and there was also some javascript errors given.
Tracking the error down finally got me to the point I realized that the total item count was nearly doubled, which then led me to the br-Tags included by Drupal.
Although someone could avoid this by just removing the br-Tags, it could also be worth thinking about whether to limit the total item count to img-Tags. Therefore I changed line 34 in jquery.waterwheelCarousel.js to this:
totalItems: $(carousel).children("img").length,
instead of previously having
totalItems: $(carousel).children().length,
I think this could make sense, maybe if someone wants to add for any reason some other elements in the carousel-div.
On the other side, I do not know if other items than images can also be rotated. If this is the case the proposed change will not be right. Than maybe a class selector could do the job.
I leave it to you Brian, whether you find this useful or not.
Just wanted to give this feedback, if maybe anyone else has the same experience.
Waterwheel is really great stuff, I like it very much.
The text was updated successfully, but these errors were encountered: