Sorry I'm not including a patch, however this is a simple fix.

In the function 'theme_scrollable_view', there is an extra comma in this block of code right at the bottom on the 'easing' line.
More forgiving browsers don't have a problem with this, but good ol' IE6 completely breaks over it.

$js = '$(document).ready(function() {         
           // initialize scrollable  
           $("div.scrollable").scrollable({
             size: '. $options['size'] .',
             vertical: '. $options['vertical'] .',
             clickable: '. $options['clickable'] .',
             loop: '. $options['loop'] .',
             interval: '. $options['interval'] .',
             speed: '. $options['speed'] .',
             keyboard: '. $options['keyboard'] .',
             items: ".'. $options['items'] .'",
             prev: ".'. $options['prev'] .'",
             next: ".'. $options['next'] .'",
             prevPage: ".'. $options['prevPage'] .'",
             nextPage: ".'. $options['nextPage'] .'",
             navi: ".'. $options['navi'] .'",
             easing: "'. $options['easing'] .'",
           });     
         });';

The comma at the end of the definition for the 'easing' element needs to be remove. Here is the correct version:

  $js = '$(document).ready(function() {         
           // initialize scrollable  
           $("div.scrollable").scrollable({
             size: '. $options['size'] .',
             vertical: '. $options['vertical'] .',
             clickable: '. $options['clickable'] .',
             loop: '. $options['loop'] .',
             interval: '. $options['interval'] .',
             speed: '. $options['speed'] .',
             keyboard: '. $options['keyboard'] .',
             items: ".'. $options['items'] .'",
             prev: ".'. $options['prev'] .'",
             next: ".'. $options['next'] .'",
             prevPage: ".'. $options['prevPage'] .'",
             nextPage: ".'. $options['nextPage'] .'",
             navi: ".'. $options['navi'] .'",
             easing: "'. $options['easing'] .'"
           });     
         });';

Comments

justindodge’s picture

I should mention the file I'm referring to is scrollable.module

akaserer’s picture

Status: Needs review » Reviewed & tested by the community

first of all: this module is great

and: yes it modificationworks

just remove the last comma after
easing: "'. $options['easing'] .'",

one way to solve is to add the following to your template.php

replace YORUTHEMENAME !!!

function YOURTHEMENAME_scrollable_view($view, $options = array(), $rows = array()) {
  //print_r($view);
  //print_r($options);
  //print_r($rows);
  
  $path = drupal_get_path('module', 'scrollable');
  drupal_add_js($path .'/js/jquery.scrollable.min.js');
  
  drupal_add_css($path .'/css/scrollable_'. (($options['vertical']) ? 'vertical' : 'horizontal') .'.css');
  
  if ( $options['mousewheel'] ) {
    drupal_add_js($path .'/js/jquery.mousewheel.min.js');
  }
  
  $js = '$(document).ready(function() {         
           // initialize scrollable  
           $("div.scrollable").scrollable({
             size: '. $options['size'] .',
             vertical: '. $options['vertical'] .',
             clickable: '. $options['clickable'] .',
             loop: '. $options['loop'] .',
             interval: '. $options['interval'] .',
             speed: '. $options['speed'] .',
             keyboard: '. $options['keyboard'] .',
             items: ".'. $options['items'] .'",
             prev: ".'. $options['prev'] .'",
             next: ".'. $options['next'] .'",
             prevPage: ".'. $options['prevPage'] .'",
             nextPage: ".'. $options['nextPage'] .'",
             navi: ".'. $options['navi'] .'",
             easing: "'. $options['easing'] .'"
           });     
         });';
  
  drupal_add_js($js, 'inline');
  
  return theme('scrollable', $rows, $options);
}

is it possible that somebody creates a patch and commits??

thanks

akaserer’s picture

operations’s picture

Priority: Normal » Minor

HI,
Thanks for solving my problem (extra comma in jquery), I'd like to mention that it was appearing in both IE6, IE7 in my website.

This module is awesome! but I still think that it needs to have a configuration of continuous scrolling (not to go backwards till the first item, instead to display the first beside the last and continue scrolling).

Another thing, is that when a user clicks prev. button it navigates backwards then move again.. so it must pause when a user desires to manually navigate.

Regards,

batje’s picture

Status: Reviewed & tested by the community » Closed (duplicate)