diff --git contrib/views_slideshow_cycle/views_slideshow_cycle.module contrib/views_slideshow_cycle/views_slideshow_cycle.module index a7f25b5..860d21c 100644 --- contrib/views_slideshow_cycle/views_slideshow_cycle.module +++ contrib/views_slideshow_cycle/views_slideshow_cycle.module @@ -11,8 +11,15 @@ function views_slideshow_cycle_init() { // Load jQuery Cycle $cycle_path = libraries_get_path('jquery.cycle'); - if (!empty($cycle_path) && file_exists($cycle_path . '/jquery.cycle.all.min.js')) { - drupal_add_js($cycle_path . '/jquery.cycle.all.min.js'); + if (!empty($cycle_path) { + // Attempt to load minified version of jQuery cycle plugin. + if (file_exists($cycle_path . '/jquery.cycle.all.min.js')) { + drupal_add_js($cycle_path . '/jquery.cycle.all.min.js'); + } + // Otherwise load non-minified version. + elseif (file_exists($cycle_path . '/jquery.cycle.all.js')) { + drupal_add_js($cycle_path . '/jquery.cycle.all.js'); + } } // Load Json2 @@ -71,4 +78,4 @@ function views_slideshow_cycle_help($path, $arg) { } return $output; } -} \ No newline at end of file +}