PageSourceSearch

https://www.rentcoworking.com.br/view/js/fixHeightSlideMobile.js

js rentcoworking.com.br collected 2026-09-30 18:11:18 UTC 1,606 bytes, 37 lines download raw bytes

1$(function () {
2    function setCorrectHeightSlide() {
3        const slideItem = $('[slide-item-mobile]');
4        const widthSlide = slideItem.width();
5        const initialPosition = 1;
6        if(slideItem.siblings().length > 0){
7            const PosicaoDoSlide = Math.abs(slideItem.siblings().css("transform").replace(/[^0-9\-.,]/g, '').split(',')[4]);
8            const currentPosition = PosicaoDoSlide / widthSlide + initialPosition;
9            let count = 1;
10            let originalHeight;
11            slideItem.each(function () {
12                if (count == currentPosition) {
13                    if ($(this).is('[allDevices]')) {
14                        originalHeight = $(this).height();
15                        $('.mask-slider-destaque-mobile').filter(':has([onlyMobile])').css('height', '');
16                        $('.slider-destaque-mobile').height(originalHeight);
17                    } else {
18                        const heightItem = $(this).height();
19                        $('.mask-slider-destaque-mobile').filter(':has([onlyMobile])').css('height', 'auto');
20                        $('.slider-destaque-mobile').height(heightItem);
21                    }
22                }
23                count++;
24            })
25        }else if(slideItem.is('[onlyMobile]')){
26            $('.mask-slider-destaque-mobile').filter(':has([onlyMobile])').css('height', 'auto');
27
28        }
29    }
30    function pageHasSlide(){
31        const slideItem = $('[slide-item-mobile]');
32        return slideItem.length > 0;
33    }
34    if(pageHasSlide()){
35       setInterval(setCorrectHeightSlide, 0.1);
36    }
37});

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.