Today I'll show you how you can easily display a CURRENT / TOTAL count to your flexslider in Drupal 7 using the flexslider.module and some custom JavaScript.
Just use the following code and modify it to your needs before:
function _flexslider_show_pager() {
(function($) {
jQuery('#flexslider-1').on('start', function(event) {
var $pager = $(this).find('.flex-sidebar-direction-nav-pager-webksde');
if ($pager.length = 0) {
$pager = $('
');
$(this).find('ul.flex-sidebar-direction-nav').prepend($pager);
}
$flexslider = $(this).data('flexslider');
$pager.children('.pager-current').text($flexslider.currentSlide + 1);
$pager.children('.pager-total').text($flexslider.count);
});
jQuery('#flexslider-1').on('after', function(event) {
var $pager = $(this).find('.flex-sidebar-direction-nav-pager-webksde');
if ($pager.length >= 0) {
$flexslider = $(this).data('flexslider');
$pager.children('.pager-current').text($flexslider.currentSlide + 1);
$pager.children('.pager-total').text($flexslider.count);
}
});
})(jQuery);
}
Don't forget to call the function! :)