jCarousel - cufon disappears after the first rotat

2019-08-08 23:50发布

I'm using cufon with jCarousel.

The carousel has four items and they rotate from left to right.

The carousel is set to 'circular' and the cufon paragraphs are disappearing after the first rotation.

What can I do to get jCarousel and cufon to work so that the headlines don't disappear?

2条回答
混吃等死
2楼-- · 2019-08-09 00:20

How about trying something like this to refresh cufon on each 'rotation' - I'm assuming that your jCarousel container has a class of jcarousel:

$('.jcarousel').bind('jcarouselanimate', function(event, carousel) {
    Cufon.refresh();
});
查看更多
虎瘦雄心在
3楼-- · 2019-08-09 00:37

I tried a lot and found that, Jcarousel does not include the jquery.jcarousel.js by default. So try adding the following line to the jcarousel.module file in modules/jcarousel.

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

After that instead of this on line 287 of jquery.jcarousel.js... if (i + 1 < self.first) {

replace it to this...

if (i + 1 < self.first % this.options.size) {

All the best...

It worked for me.

查看更多
登录 后发表回答