I had a problem with Flexslider funcionality when using Views Infinite Scroll 7.1.1
The problem was that flexslider only loaded on page load, witch didnt carry trough when using Views Infinite Scroll as a pager in Views. My images with the set .flexslider container class didnt show at all on additional content loaded trough VIS.
I couldnt find any solution to the problem anywhere. After some analyzing I tried this and it seems to work fine.
# Change - call added to views_infinite_scroll.js - line 44
load: function() {
$('div#views_infinite_scroll-ajax-loader').remove();
Drupal.attachBehaviors(this);
// --- Below is the added call to the flexslider function to kick in desired behavior ---
$('.flexslider').flexslider();
}
The question is: Is there a better way to handle this or should this be implemented in some more elegant way?
Comments
Comment #1
pacome CreditAttribution: pacome commentedHi,
i have another issue with flexslider : the slider works well but it breaks views infinite scroll, all the items appear at once on page load.
Any idea ?
Comment #2
pacome CreditAttribution: pacome commentedHi,
I was working on a test installation with only two elements to load, and 1 element per page set and i just noticed that it's working well after the second element, at least with flexslider formatter for fieldcollection.
It load two elements at once, then one element after another.
So there is a little bug remaining, but nothing very important in my case.
regards
-p-
Comment #3
siggi_hrafn CreditAttribution: siggi_hrafn commented@pacome - It seems like the call to the fist loaded function is broken by the behavior of the later loaded function.
Going into details might help other with the same problem ;)
Regards
Siggi
Comment #4
pacome CreditAttribution: pacome commentedHi Siggi_hrafn,
thanks for your reply, i gave it a try on an already existing website with more complex content, and everything is working well.
In this last situation, i installed flexslider after views-infinite-scroll.
My slides are rendered using flexslider for field-collection, within a view displaying fields.
Hope that can help ;)
regards
-pacome-
Comment #5
Honza Pobořil CreditAttribution: Honza Pobořil as a volunteer commentedComment #6
Honza Pobořil CreditAttribution: Honza Pobořil as a volunteer commented