07 jan 2021 15h09
Venda: Ssd Sata Wd Green 240gb - Para Notebook, Mini Pc - 2.5
Venda: Memoria Corsair 8gb (2 X 4gb) Ddr3 Notebook, Mini Pc
Venda: Injetor Poe Eap225 24v Passivo - Tl-poe2412g - Tp-link
Venda: Injetor Poe Ubiquiti 802.3at 48v 30w Gigabit U-poe-at
var banners = new Swiper ('#banner-rotate-6', {
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
slidesPerView: 1,
slidesPerGroup: 1,
//spaceBetween: 26,
pagination: {
el: '#banner-rotate-pagination-6',
clickable: true
},
preventClicks: false,
// reload gif
on: {
transitionStart: function (index, element) {
var img_type = $('#banner-rotate-6 .swiper-slide-active').attr("data-img-type");
if(img_type == 'gif'){
var imgID = $('#banner-rotate-6 .swiper-slide-active').attr("data-img-id");
var src = $('#'+imgID).attr('data-src')+"?" + new Date().getTime();
$('#'+imgID).attr('src', src);
}
}
}
});
<div class="swiper-container" id="banner-rotate-7">
<div class="swiper-wrapper">
<div class="swiper-slide" data-swiper-autoplay="4000" data-img-id="jpg-695" data-img-type="jpg">
<img id="jpg-695" data-src="img1.jpg" src="img1.jpg" width="470" height="156">
</div>
<div class="swiper-slide" data-swiper-autoplay="12920" data-img-id="gif-700" data-img-type="gif">
<img id="gif-700" data-src="img2.gif" src="img2.gif" width="470" height="156">
</div>
<div class="swiper-slide" data-swiper-autoplay="4000" data-img-id="jpg-699" data-img-type="jpg">
<img id="jpg-699" data-src="img3.jpg" src="img3.jpg" width="470" height="156">
</div>
</div>
<!-- Add Pagination -->
<div id="banner-rotate-pagination-7" class="swiper-pagination"></div>
</div>
// returns length of time to display a gif image/animation once
// must be multipled by getGIFIterations to determine total duration
function getGIFDuration($image_filename)
{
// see http://www.w3.org/Graphics/GIF/spec-gif89a.txt for more info
$gif_graphic_control_extension = "/21f904[0-9a-f]{2}([0-9a-f]{4})[0-9a-f]{2}00/";
$file = file_get_contents($image_filename);
$file = bin2hex($file);
// sum all frame delays
$total_delay = 0;
preg_match_all($gif_graphic_control_extension, $file, $matches);
foreach ($matches[1] as $match) {
// convert little-endian hex unsigned ints to decimals
$delay = hexdec(substr($match,-2) . substr($match, 0, 2));
if ($delay == 0) $delay = 1;
$total_delay += $delay;
}
// delays are stored as hundredths of a second, lets convert to seconds
$total_delay *= 10;
return $total_delay-1000;
}
© MNDTI - Tecnologia e Informação. Todos Direitos Reservados. Política de privacidade.