I need 2 vertical columns of images, both scrolled together by the same controls.

I can achieve this with CSS to .jcarousel-clip-vertical. Making the column taller so more images are displayed isnt a problem.

However when I make the div wider so their are 2 columns, when you scroll past the images you can keep scrolling a few times even thought their isnt anything to scroll.

Im assuming this is happening as the module doesn't expect their to be 2 columns, so its making the scrollable area twice as large as it should be. Could someone tell me where this code is or how to override it? If I could half the value of this calculation im guessing everything would work properly.

Thanks

Comments

jdln’s picture

Ive think ive found a solution but I dont know how to implement it. To have 2 collums, I need to have 2 images per li tag.
http://github.com/jsor/jcarousel/issues#issue/54

How can I make this module or views do this?
Thanks

jdln’s picture

I think this is the code I need to edit;

/**
* Views Slideshow: breakout teaser.
*
* @ingroup themeable
*/
function theme_views_slideshow_jcarouselthumbs_breakout_teaser($item, $id, $count) {
  $current = $count + 1;
  $classes = array(
    'views_slideshow_jcarouselthumbs_div_breakout_teaser',
  );
  if (!$count) {
    $classes[] = 'views_slideshow_jcarouselthumbs_active_teaser';
  }
  $classes[] = ($count % 2) ? 'views-row-even' : 'views-row-odd';

  $attributes['class'] = implode(' ', $classes);
  $attributes['id'] = "views_slideshow_jcarouselthumbs_div_breakout_teaser_${id}_${count}";
  $attributes = drupal_attributes($attributes);

  return "<li$attributes>$item</li>\n";
}

If I edit the last line like this;

  return '<div class="testdiv">' . "<li$attributes>$item</li>\n" . '</div>';

I can see my testdiv is around each li item. So I think this is the line I need to work with. How can I make it output 2 items to each li?
Thanks

jdln’s picture

Anyone? Is that im trying to do possible?

betoaveiga’s picture

I'm having empty scrolling too if I click on an ajax pager (in another block for example) before scrolling ends. It's a really weird behavior...

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after a lack of activity. Support on how to use the jCarousel library is not provided in the issue queue. We're focused on end-user functionality and how to use the jCarousel module, not how to work with the library.

pfrenssen’s picture

This can be done easily in the D7 version by overriding jcarousel-view.tpl.php:

<?php
/**
 * @file jcarousel-view.tpl.php
 * View template to display a list as a carousel.
 */
?>
<ul class="<?php print $jcarousel_classes; ?>">
  <?php foreach ($rows as $id => $row): ?>
    <?php if ($id % 2 == 0): ?><li class="<?php print $row_classes[$id]; ?>"><?php endif; print $row; if ($id % 2 != 0 || $id == $view->total_rows - 1): ?></li><?php endif; ?>
  <?php endforeach; ?>
</ul>