Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var cesta = './resources/slider/';
- run(5000, 5);
- function run(interval, frames) {
- var cislo = 0;
- var item = $('.slider');
- func();
- function func() {
- cislo++;
- if(cislo == frames) { cislo = 0; }
- item.fadeOut(1000, function() {
- item.css('background-image', 'url(' + cesta + 'slider_' + cislo + '.jpg)').fadeIn(1000, function() {
- });
- });
- window.setInterval(func, interval);
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement