The jQuery selector to specify each step.
$('#jmpress').jmpress({
stepSelector: 'section' // use <section> tags as steps
});
Class name to remove on root element if jmpress.js is supported.
$('#jmpress').jmpress({
notSupportedClass: 'no-jmpress'
});
Whether jmpress.js should run in full screen mode or in a container.
$('#jmpress').jmpress({
fullscreen: false
});
A class name to set on the container. The overall container of the camera. It has no transformation applied so you can set some background on it.
$('#jmpress').jmpress({
containerClass: 'jmpress-container'
});
A class name to set on the canvas. The canvas is the element, which contains the steps.
$('#jmpress').jmpress({
canvasClass: 'jmpress-canvas'
});
A class name to set on the area. The area is some middle element, which is needed to build this camera.
$('#jmpress').jmpress({
areaClass: 'jmpress-area'
});
Set the CSS animation values for transitions between slides.
$('#jmpress').jmpress({
animation: {
transformOrigin: 'center center', // Point on which to transform (unused)
transitionDuration: '5s', // Length of animation
transitionDelay: '500ms', // Delay before animating
transitionTimingFunction: 'ease' // Animation effect
},
transitionDuration: 5000 // Set this according to animation.transitionDuration
// It is used for setting the timeout for the transition
});
See Mozilla CSS docs for more info.
Set the alignment of the steps inside the container. The default is 50%
50%
which centers the steps.
$('#jmpress').jmpress({
originX: "0%",
originY: "100%"
// Steps are aligned to the bottom left corner.
});
Initializes jmpress with the default config (like impress.js).
$('#jmpress').jmpress();
Initializes jmpress with a custom config object.
$('#jmpress').jmpress({
// config object literal here
});
Can also initialize a single step. This is required when dynamically adding steps:
var newStep = $('<div class="step" />').html('This is a new step');
$('#jmpress').jmpress('canvas').append(newStep);
$('#jmpress').jmpress('init', newStep);
See the dynamic form example
Returns true if jmpress is initialized.
var isInit = $('#jmpress').jmpress('initialized');
Deinits jmpress, returning to it's original state. If already deinited it does nothing. This is useful for enabling a print mode or when dynamically removing steps:
var removeStep = $('.step').first();
$('#jmpress').jmpress('deinit', removeStep);
removeStep.remove();
Returns the settings object which you can modify.
var settings = $('#jmpress').jmpress('settings');
settings.animation.transitionDuration = '10s';
Move to the first step matching the given selector.
reason
can be a string which passed to the callbacks in eventData.reason
.
$('#jmpress').jmpress('select', '#step-5', 'i said so');
Same as select( selector, 'jump' )
.
Select the next step in flow.
$('#jmpress').jmpress('next');
Select the previous step in flow.
$('#jmpress').jmpress('prev');
Select the first step in DOM.
$('#jmpress').jmpress('home');
Select the last step in DOM.
$('#jmpress').jmpress('end');
Fire a event. callbackName
must be registered as callback before.
$('#jmpress').jmpress('fire', 'selectNext', step, {
// Additional data for event here
});
Returns the canvas element as jQuery object.
var canvas = $('#jmpress').jmpress('canvas');
Sets styles on the canvas element and returns it.
deprecated: Use canvasClass
and CSS.
Applies css with the correct browser prefix.
var el = $('#step-2').get(0);
$('#jmpress').jmpress('css', el, {
transform: 'rotate(90deg)' // Will be -webkit-transform if a Webkit browser
});
Reapplies styles on step. Should be called after modifying
step.data("stepData")
, which is allowed.
Return or modify the default settings used in jmpress.js.
Should only be used in plugins. Use settings
instead.
var defaults = $('#jmpress').jmpress('defaults');
Register a new callback. After that it can be fire
ed and listened.
Register a new jmpress function.
Returns the active step as jQuery object.
var activeStep = $('#jmpress').jmpress('active');
Returns the a state for the jmpress instance. Should be only used by plugins for saving some state.
Returns the dataset of an element. private
After all the steps are initialized.
After all the steps are de-initialized.
Before each step change. eventData.cancel()
cancels the select.
Before all the steps are de-initialized.
Before all the steps are initialized.
On each step as it is initialized.
On each step as it is initialized.
A listener should read values from eventData.data
and store them after
string-to-xxx conversion into eventData.stepData
Called last on each step after it is initialized to apply css.
A listener should read eventData.stepData
and apply css the the element
Called last on each step after is is de-initialized to remove css.
Listener should return the last step.
A listener should return undefined
if it do not want to modify the selection
of the previous listener. If it returns a value it overrides the old selection.
Listener should return the first step.
Listener should return the initial step.
Listener should return the next step.
Listener should return the previous step.
Called after jmpress finished transition and there is nothing pending.
Listener should apply CSS for the camera to eventData.canvas
and
eventData.area
.