PageSourceSearch

https://www.hotelgrifo.com/templates/template_1/js/carousel.js

js hotelgrifo.com collected 2026-10-05 18:37:08 UTC 2,111 bytes, 63 lines download raw bytes

1$(document).ready(function(){
2    var contatipocarousel = $('.carouselslide .carousel-showmanymoveone').length;
3    if(contatipocarousel > 0){
4        $('.carouselslide .carousel-showmanymoveone').each(function(){
5            var idcarousel = $(this).attr('id');
6            var intervallo = $(this).find('input[name=temposlide]').val();
7            if(!intervallo){
8                intervallo = 5000;
9            }
10            
11            generacopiaslide(idcarousel);
12            
13            $('#'+idcarousel).carousel({ interval: intervallo});
14        });
15        
16        /** Effetti swipe sul carousel **/
17        $(".carousel").swiperight(function(){ $(this).carousel('prev'); });
18        $(".carousel").swipeleft(function(){ $(this).carousel('next'); });
19    }
20});
21
22function generacopiaslide(idcarousel){
23    var countcarousel = 1;
24
25    var numerocarousel = $('#'+idcarousel+'.carousel-showmanymoveone .item').length;
26
27    $('#'+idcarousel+'.carousel-showmanymoveone .item').each(function(){
28        
29        var contanumerofoto = $('#'+idcarousel+'.carousel-showmanymoveone [name="countNC"]').val();
30        var numerofoto = contanumerofoto;
31        
32        if(contanumerofoto == 2){
33            if(countcarousel == numerocarousel){
34                numerofoto++;
35            }
36        }
37        else if(contanumerofoto == 3){
38            if(countcarousel == numerocarousel || countcarousel == numerocarousel-1){
39                numerofoto++;
40            }
41        }      
42        else if(contanumerofoto == 4){
43            if(countcarousel == numerocarousel || countcarousel == numerocarousel-1 || countcarousel == numerocarousel-2){
44                numerofoto++;
45            }
46        } 
47        countcarousel++;
48        
49        var itemToClone = $(this);
50
51        for (var i=1; i < numerofoto; i++) {
52          itemToClone = itemToClone.next();
53
54          if (!itemToClone.length) {
55            itemToClone = $(this).siblings(':first');
56          }
57
58          itemToClone.children(':first-child').clone()
59            .addClass("cloneditem-"+(i))
60            .appendTo($(this));
61        }
62    });
63}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.