Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- jQuery('#flip').jcarousel({
- scroll: 1,
- wrap: 'circular',
- visible: 3,
- auto: 3});
- var images = $('#splash').attr('data-images').split(',');
- var hrefs = $('#splash a.caption').attr('data-hrefs').split(',');
- var titles = $('#splash a.caption').attr('data-titles').split(',');
- var items = $('#splash a.caption span.item').attr('data-texts').split(',');
- var stores = $('#splash a.caption span.store').attr('data-texts').split(',');
- $.each(images,function(key,value){
- $('<img />').attr('src', 'images/goods/' + value + '.jpg');
- });
- var counter = 0;
- setInterval(function () {
- counter++;
- var index = (counter%images.length);
- $('#splash').css({'background-image' : ('url(images/goods/' + images[index] + '.jpg)')});
- $('#splash a.caption').attr({'href' : hrefs[index], 'title' : titles[index]});
- $('#splash a.caption span.item').text(items[index]);
- $('#splash a.caption span.store').text(stores[index]);
- }, 5 * 1000);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement