I'm creating a little game where a user selects from a set of items then the selected items are shuffled and one is chosen.
I'm using jQuery cycle (http://jquery.malsup.com/cycle/) to run the main animation and select a random item (using the random order feature and a custom animation).
However, the way I'm animating the items means I need them to all remain visible while they're animating - they're all positioned absolutely.
So here's the question:
Is there a way to stop jQuery cycle from applying display: none;
to all of the items before it starts?
I don't mind modifying the original script to do this if necessary.
$('#item-container').cycle({
fx: 'custom',
cssBefore:{
left: 0,
top: 0,
display: 'block',
zIndex: 1
},
animIn: {
left: 200,
top: 200
},
animOut: {
left: 0,
top: 0
},
cssAfter:{
zIndex: -40,
display: 'block'
},
speed: 400,
timeout: 400,
random: 1,
autostop: 1,
autostopCount: 25,
continuous: 1,
slideExpr: 'div.selected'
});
Thanks!