(+84) 463.28.7979

“bgSlider”


bgSlider allows to apply the gallery as a website background. It’s quite similar to jbGallery script, but not such complex.

JavaScript

We should include jQuery framework and bgSlider.js by pointing src attribute in the script tag to those .js files:

1

Below is the initialization script:

2

In the $() part we specify an array with the path to image files, and in the bgSlider({}) part – gallery options. Here’s the list of supported options:

interval: time delay in milliseconds between each slide
speed: animation time
pags: controls to switch between slides. Specify path to anchors .pags li a.

HTML

The HTML code will look like this then:

1
2
3
4
5
6
<ul class="pags">
<li class="first"><a href="#" rel="1">01</a></li>
<li class="last"><a href="#" rel="2">02</a></li>
</ul>

Note, that each element should have a rel=”” attribute with the number of a slide.

slideshow: true or false for slideshow option
preload: true or false for preloading images (recommended)
current: specify the rel=”” number of the image which should be displayed as default one

CSS

You can find script related stylesheet in the style.css file.

3

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>