views:

522

answers:

3

I found that CrossSlide causes video playback on the same page to stutter quite badly. My thought was to have the cross slide effect on the same page stop or pause during video play back, annd then start again when video stops.

Id doesn't look like there is any start stop function included. Does any one know how I might be able to accomplish this?

Thanks.

A: 

It looks like CrossSlide just uses $.animate() on img elements ---

have you tried $('#container img').stop(); ??

carillonator
A: 

I've tried to use stop on the CrossSlide homepage at http://www.gruppo4.com/~tobia/cross-slide.shtml. Doesn't work.

I tried an improvised method, that is using sleep set to a very large value. The down-side is the slides have to revert to the first frame upon calling it and resuming.

On that page, using Firebug to run the exact same crossSlide call except for sleep:

$('#test1').crossSlide({
  sleep: 100000, // <--- this one
  fade: 1
}, [
  { src: 'lib/sand-castle.jpeg', dir: 'up'   },
  { src: 'lib/sunflower.jpeg',   dir: 'down' }, // remaining slides doesn't really matter
  { src: 'lib/flip-flops.jpeg',  dir: 'up'   },
  { src: 'lib/rubber-ring.jpeg', dir: 'down' }
]);

To resume:

$('#test1').crossSlide({
  speed: 45, // <--- this one
  fade: 1
}, [
  { src: 'lib/sand-castle.jpeg', dir: 'up'   },
  { src: 'lib/sunflower.jpeg',   dir: 'down' },
  { src: 'lib/flip-flops.jpeg',  dir: 'up'   },
  { src: 'lib/rubber-ring.jpeg', dir: 'down' }
]);

Note: You can't use sleep and speed together.

o.k.w
did you try the jQuery `stop()` function on the image?
carillonator
I did, doesn't seem to work. It worked for you?
o.k.w
A: 

I wanted to stop CrossSlide and return the container back to its original state.

$('#container img').stop().hide('fast'); // worked for me!

Silkster