Trying to use jCarousel module on drupal with jQuery 1.10
I got an JS error: undefined function: g.browser() somewhere in the jquery.jcarousel.min.js script.
It turns out that this function was deprectead in jQuery 1.3 and dropped in 1.9.

I worked around by adding the jquery.migrate plugin
that restores the dropped functions, but it would be nice, if the versions could be aligned, so that this isn't necessary. The current version of jQuery.jcarousel plugin is 0.3.0 and would work with current (all?) jQuery versions.

Comments

fasdalf@fasdalf.ru’s picture

Same problem here. Replacing jquery.jcarousel.min.js with version 0.3.1 from http://sorgalla.com/jcarousel/dist/jquery.jcarousel-core.min.js?raw=1 does not work.
@vronkdaut
How exavtly did you add jquery.migrate?

Baher’s picture

Hi,

Go to the line 215 of jcarousel.module file and replace :

drupal_get_path('module', 'jcarousel') . '/js/jquery.jcarousel.min.js',
by
drupal_get_path('module', 'jcarousel') . '/js/jquery.jcarousel.js',

Then go to the file jquery.jcarousel.js and in the line 194,

Replace
if (!windowLoaded && $.browser.safari) {
by
if (!windowLoaded && /Safari/i.test(navigator.userAgent) && /Apple/i.test(navigator.vendor)) {

Thanks to the tip of VSEphpbb : https://github.com/jsor/jcarousel/issues/469

And it should work.

Baher

Phizes’s picture

Further down the above mentioned jCarousel issue, there is a message about the release of jCarousel 0.2.9.

So far this has been working for me along with jQuery 1.10 from the jQuery update module. I just replaced the relevant JavaScript files in the Drupal module with those from 0.2.9 jCarousel release as a stopgap solution. I am not using the JQuery migrate plugin.

  • markpavlitski committed 30dcf7a on 7.x-2.x
    Issue #2232273 by vronkdaut, fasdalf@fasdalf.ru, Phizes, Baher:...
markpavlitski’s picture

Status: Active » Fixed

This has been fixed in the 7.x-2.7 release. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.