Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div>
- <picture class="rio-slider__top">
- <source media="(max-width: 768px)" srcset="/upload/15_mobile_banner_min.png">
- <source srcset="/upload/15_desc_min.png">
- <img src="/upload/15_desc_min.png" alt="Акция -15% на весь трикотаж">
- </picture>
- <picture class="rio-slider__top" style="display:none">
- <source media="(max-width: 768px)" srcset="/upload/baby_mobi.png">
- <source srcset="/upload/baby_desk.png">
- <img src="/upload/baby_desk.png" alt="-20% на товары для новорожденных">
- </picture>
- <picture class="rio-slider__top" style="display:none">
- <source media="(max-width: 768px)" srcset="/upload/noyabr_ok_sjat_mobi_podush.png">
- <source srcset="/upload/noybr_min_sjat_podush.png">
- <img src="/upload/noybr_min_sjat_podush.png" alt="Подушка в подарок">
- </picture>
- </div>
- <script>
- document.addEventListener('DOMContentLoaded', e=>{
- function rio_slider__top(){
- let el = $('.rio-slider__top:visible');
- el.fadeOut('slow', function(){
- let next = $(this).next();
- if(next.length){
- next.show();
- } else {
- $('.rio-slider__top:first').show();
- }
- });
- }
- setInterval(rio_slider__top, 5000);
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement