What HTML is required?
This is the basic html needed to get started with your slideshow. Simply place this code wherever you want your slideshow to appear.
<div class="SliderContainer">
<!-- !start of slider -->
<div class="sjxs_sliding_content">
</div>
<!-- !end of slider -->
</div>
How do I change the transition, speed, etc.?
At the bottom of the jquery.sjxs.1.3.min.js
file are the default options that can be used for this file, you can change the global variables there.
And there are brief descriptions of what they do next to each. The xml file has more expanded descriptions and examples.
All of the examples are javascript so they will need to be put inside of <script />
tags. Below are a few examples of how to use the settings.
Basics For Setup
<script type="text/javascript">
//Start jQuery
$(document).ready(function() {
//Start the slideshow
$('.SliderContainer').simple_js_xml_slideshow();
});
</script>
The next few examples will assume that you will put these settings inside of <script />
tags like the basic example.
Example of using all the settings:
$('.SliderContainer').simple_js_xml_slideshow({
container: ".sjxs_sliding_content",
xml_url: "js/simple_jxs/simplexmlslideshow.xml",
transition_time: 3,
transition_speed: 750,
transition: 'fade',
show_loading: 'true',
random_start: 'false',
stop_on_click: 'true',
picket_fence_cnt: '15',
include_prev_next: 'true',
prev_button: '<',
next_button: '>'
});
Example of changing what xml file is used:
$('.SliderContainer').simple_js_xml_slideshow({
xml_url: "js/simple_jxs/simplexmlslideshow.xml"
});
Example of changing how the transition looks:
This will make all of the transitions look like normal wipes. Like, wipe left or wipe down/up.
$('.SliderContainer').simple_js_xml_slideshow({
xml_url: "js/simple_jxs/simplexmlslideshow.xml",
transition:'picketFenceDown',
picket_fence_cnt: 1
});
Example of changing the transition speed:
This will tell the slides to stay on screen for 8 seconds and then transition to the next slide in 547 milliseconds. Also, it's using one of the picket fence transitions and so the picket_fence_cnt
is set to 15.
$('.SliderContainer').simple_js_xml_slideshow({
xml_url: "js/simple_jxs/simplexmlslideshow.xml",
transition:'picketFenceCornerWipe',
picket_fence_cnt: 15,
transition_speed: 547,
transition_time: 8
});
What transition options are there?
Below are listed the transition options for the settings transition
. These are currently the transitions included. More are planned to be added. There is a set of transitions I call Picket Fence that allow the image to appear like it's transitioning like a fence.
If you want transitions that behave like what you expect and don't appear cut. (what I call picket fenced) Then try setting the picket_fence_cnt
option to just 1. All the transitions will behave like you would expect. There are some examples of what I'm talking about above.
transition
- fade: Simple opacity change from 0 to 100.
- easeBack: A slide from right to left with little snap back at the end of the transition.
- easeBounce: A slide from right to left with a 'bounce' snap at the end of the transition that emulates bouncing on something.
- picketFenceUp: The slide will be split into multiple pieces and fade in towards the top.
- picketFenceDown: The slide will be split into multiple pieces and fade in towards the bottom.
- picketFenceWipe: The slide will be split into multiple pieces and fade each one as it wipes onto the screen.
- picketFenceWipe2: Similar to the first wipe except it's much more blended together and much more gradual.
- picketFenceCornerWipe: The slide will be split into multiple pieces and fade in from the top corners.