Options

A function to customize the styling and animation for items to the left of the current.

afterCSS

A function to customize the styling and animation for items to the right of the current.

currentCSS

A function to customize the styling and animation for the current item.

current

The item to be current.

time

The time, in milliseconds, to animate when switching from item to item.

titles.create

A function to generate a title element for the items. (Paired with titles.destroy)

titles.destroy

A function to remove the title element for the items when the object is being destroyed. (Paired with titles.create)

titleAnimationIn

A callback function to animate the title in.

TitleAnimationOut

A callback function to animate the title out.

controls.create

A callback to add controls, such as a scrollbar, to the jCoverflip widget. (Paired with controls.destroy)

controls.destroy

A callback to remove the controls when the object is destroyed. (Paired with controls.create)

Methods

Call

Description

next( [by=1], [wrapAround=true], [callback], [originalEvent={}])

Move to the next item.

by: the number to move ahead by

wrapAround: wraps back around to the start if exceeds the number

callback: a function to get called

originalEvent: the originating event object

previous( [by=1], [wrapAround=true], [callback], [originalEvent={}])

Move to the previous item.

by: the number to move back by

wrapAround: wraps back around to the end if exceeds the number

callback: a function to get called

originalEvent: the originating event object

last([callback], [originalEvent={}])

Move the current to the end.

callback: a function to get called

originalEvent: the originating event object

first([callback], [originalEvent={}])

Move the current to the start.

callback: a function to get called

originalEvent: the originating event object

current([newCurrent, [originalEvent]])

Get the current item index if no parameters are passed. If newCurrent is passed, then it will move the current item to the index.

length

Get the length of the number of items.

Events

Name

Description

change

Triggers when the current item changes.

start

Triggers when starting to change the current item.

stop

Triggers when stopping to change the current item.

next

Triggers when the next method is called.

previous

Triggers when the previous method is called.

first

Triggers when the first method is called.

last

Triggers when the last method is called.

Starting item

Is there a way to start on an item other than the first item?

If you would like jCoverflip to start on an item that is not the first item, you can use the current option. For example, if you want to start on the third item, passing in the option current set to 3 when calling jcoverflip: