Я использую слайд-шоу, которое я создал с Javascript для моего сайта. Хотелось бы добавить счетчик.добавление счетчика jquery slideshow
1 из 3 ...
слайд 1/общий слайд ...
не удается найти решение ...
вот мой код:
$(document).ready(function() {
// set display:none for all members of ".pic" class except the first
$('.image_news:gt(0)').hide();
// stores all matches for class="pic"
var $slides = $('.image_news');
$slides.click(function(){
// stores the currently-visible slide
var $current = $(this);
if($current.is($slides.last())) {
$current.hide();
$slides.first().show();
}
// else, hide current slide and show the next one
else {
$current.hide().next().show();
}
});
});
и fsfiddle ссылку с примером: http://jsfiddle.net/XRpeA/3/
спасибо за йо помогите!