New Post has been published on Html Use
New Post has been published on http://www.htmluse.com/pgwslideshow-responsive-slideshow-for-jquery/
PgwSlideshow - Responsive slideshow for jQuery
Download Demo
This jquery plugin PgwSlideshow - Responsive slideshow / gallery / carousel for jQuery / Zepto
Fully responsive slideshow
Desktop and Mobile devices supported
Less than 4 KB (minified and gzipped)
Full customization with the CSS file included
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" type="text/css" href="http://s1c.pagawatic.com/css/pgwslideshow-pgwslideshow_light-v226.css"/> <script type="text/javascript" src="http://s1c.pagawatic.com/js/jquery.js"></script> <script type="text/javascript" src="http://s1c.pagawatic.com/js/pgwslideshow-v226.js"></script>
2. HTML
<ul class="pgwSlideshow"> <li><img src="san-francisco.jpg" alt="San Francisco, USA" data-description="Golden Gate Bridge"></li> <li><img src="rio.jpg" alt="Rio de Janeiro, Brazil"></li> <li><img src="london_mini.jpg" alt="" data-large-src="london.jpg"></li> <li><img src="new-york.jpg" alt=""></li> <li><img src="new-delhi.jpg" alt=""></li> <li><img src="paris.jpg" alt=""></li> <li><img src="sydney.jpg" alt=""></li> <li><img src="tokyo.jpg" alt=""></li> <li><img src="honk-kong.jpg" alt=""></li> <li><img src="dakar.jpg" alt=""></li> <li><img src="toronto.jpg" alt=""></li> <li> <a href="http://en.wikipedia.org/wiki/Monaco" target="_blank"> <img src="monaco.jpg" alt="Monaco"> </a> </li> </ul>
3. JAVASCRIPT
$(document).ready(function() $('.pgwSlideshow').pgwSlideshow(); );
4. GALLERY COMPONENTS
The statement of the carousel elements is defined via a HTML tag “<ul>” (see the example above).
You can add one or more slideshows on a same page.
Image
Each element must be placed in a <li> tag. By default, the image will be used in the list and to display the current element.
alt - This parameter defines the image title, it is used to display a caption on the image when it is selected. (See the first image in our example)
data-description – This parameter adds a new text line in the caption of the selected element. (See the first element in the example)
data-large-src – If you want to load a small image in the list, and a bigger when this image will be selected, you can add a “data-large-src” parameter to your <image> tag. (See the third image in the example)
Link
If you wish, you can create a link on your image by wrapping the <img> tag with a <a> tag (with or without “target” parameter). This link only appears on the container of the selected image, not in the list. (See the last image in the previous example)
5. CAROUSEL PLUGIN OPTIONS
These options can be added during the initialization of the slider to customize it.
Option name Type Default Description mainClassName String
'pgwSlideshow'
This option overrides the default CSS class of the slideshow. transitionEffect String
'sliding'
2 transition effects are available: “sliding” or “fading”. autoSlide Boolean
false
Enable or disable the automatic transition between the gallery images. displayList Boolean
true
This option displays or not the list of the carousel elements. displayControls Boolean
true
On the main container, this parameter sets a button on each side to display the previous or next image. touchControls Boolean
true
If this option is activated, the main container binds the touch movements and displays the previous or next slide. (Only the mobile devices send these events) maxHeight Integer
null
If you want to set a maximum height to your slideshow, you can set this option with a number in pixels (without the suffix “px”). beforeSlide Function
null
This option may contain a function that will be called before each new slide. For example: “function() console.log(‘before’); ” afterSlide Function
null
In the same way as beforeSlide, the function afterSlide can be called after each slide. For example: “function() console.log(‘after’); ” adaptiveDuration Integer
200
This duration is the period in milliseconds, during the adjustment of the previous option runs (if it is activated). transitionDuration Integer
500
Period of animation in milliseconds between 2 images. intervalDuration Integer
3000
Interval in milliseconds before displaying of the next image. This option requires “autoSlide” option activated.
6. SLIDESHOW API
To use these gallery API functions, you must assign the initialization to a variable.
var pgwSlideshow = $('.pgwSlideshow').pgwSlideshow();
startSlide - Enables the automatic sliding function.
pgwSlideshow.startSlide();
stopSlide - Disables the automatic sliding function.
pgwSlideshow.stopSlide();
getCurrentSlide - Returns the current image number.
pgwSlideshow.getCurrentSlide();
getSlideCount - Returns the total number of the gallery elements.
pgwSlideshow.getSlideCount();
displaySlide - Displays the image selected by its number.
pgwSlideshow.displaySlide(3);
nextSlide - Displays the next image.
pgwSlideshow.nextSlide()
previousSlide - Displays the previous image.
pgwSlideshow.previousSlide();
destroy - Destroys the carousel. If a parameter “true” is passed, the container will be only hidden for a possible reloading.
pgwSlideshow.destroy();
reload - Reloads the slideshow with new options of configuration. For example:
pgwSlideshow.reload( transitionEffect : 'fading', adaptiveDuration : 4000 );











