Chia sẻ code thông báo sản phẩm góc trái cho blogspot

Chia sẻ code thông báo sản phẩm góc trái cho blogspot
Tiêu đềChia sẻ code thông báo sản phẩm góc trái cho blogspot

<!-- thong bao san pham -->

<div class='jas-sale-pop flex pf middle-xs'/>

<script type='text/javascript'>

//<![CDATA[

$(document).ready(function ($) {

SalesPop()

});

function fisherYates ( myArray ) {

var i = myArray.length, j, temp;

if ( i === 0 ) return false;

while ( --i ) {

j = Math.floor( Math.random() * ( i + 1 ) );

temp = myArray[i];

myArray[i] = myArray[j];

myArray[j] = temp;

}

}

var collection = new Array();





collection[0]="<a href='/2019/07/super-fast-load-template-ver-2.html' class='jas-sale-pop-img mr__20'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzZeACfXxv4KADGc0oA_o9tv4dTmGNbiL78GoV6TpVAmA1gx25XdRzH7DjKzxWd_p46hGpfGnmoCylwKBJ76TEhuVQW0qMi-zifkL8RIcWqBsR1NTf2mBTljAKpD7Zj6aWPsrUQxXBUQCF/w100/super-fast-load-template-v2.PNG' alt='Cây Lan Ý trong nước' width='65' height='84' /></a><div class='jas-sale-pop-content'><h4 class='fs__12 fwm mg__0'>Giao diện</h4><h3 class='mg__0 mt__5 mb__5 fs__18'><a href='/2019/07/super-fast-load-template-ver-2.html' title='Template Blogspot Super Fast Load'>Template Blogspot Super Fast Load</a></h3><span class='fs__12 jas-sale-pop-timeago'></span></div><span class='pe-7s-close pa fs__20'></span>";







collection[1]="<a href='/2019/07/sora-seo-blogger-template.html' class='jas-sale-pop-img mr__20'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYPem4vN84l2wztPOtXHo0lMuw1bkep1p5wWc61QZ4I-xOCAdK4RstG6XOwitzSuCHp9yYacMMTPx7AmQEwaBgPkFE-g1cYyhVv-C_IODkw5PAsTLJN6nRvG7TGh5TDc18UuzPT1JIb6aD/w100/sora-seo-blogger-template.png' alt='' width='65' height='84' /></a><div class='jas-sale-pop-content'><h4 class='fs__12 fwm mg__0'>Giao diện</h4><h3 class='mg__0 mt__5 mb__5 fs__18'><a href='/2019/07/sora-seo-blogger-template.html' title=''>Template Blogspot Sora Seo Template Premium</a></h3><span class='fs__12 jas-sale-pop-timeago'></span></div><span class='pe-7s-close pa fs__20'></span>";







collection[2]="<a href='/2019/06/flatsome-blogger-template-ban-theme.html' class='jas-sale-pop-img mr__20'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9Tw-OY_cQUQp9xgoL15w6I68h8poTE-DBulrFEdXAHASyXPl0KJ8EsRpr3jzGbfRTEPf3NoPgnJKeQTvaR1Ef3a-nEHd0u3KySMHaFloRjYvOC2Qb5KjvrYIduxIyFQqOLb5SIyWzwHp2/w100/flatsome-blogger-template.png' alt='Cây Vạn Niên Thanh' width='65' height='84' /></a><div class='jas-sale-pop-content'><h4 class='fs__12 fwm mg__0'>Giao diện</h4><h3 class='mg__0 mt__5 mb__5 fs__18'><a href='/2019/06/flatsome-blogger-template-ban-theme.html' title=''>Flatsome Blogger Template bán theme chuẩn Seo</a></h3><span class='fs__12 jas-sale-pop-timeago'></span></div><span class='pe-7s-close pa fs__20'></span>";







fisherYates(collection);

  function SalesPop() {

  if ($('.jas-sale-pop').length < 0)

  return;

  setInterval(function() {

  $('.jas-sale-pop').fadeIn(function() {

  $(this).removeClass('slideUp');

  }).delay(5000).fadeIn(function() {

  var randomTime = ['1 phút', '5 phút', '10 phút', '12 phút', '14 phút', '16 phút', '18 phút', '20 phút', '25 phút', '30 phút', '36 phút', '38 phút', '40 phút', '42 phút', '45 phút', '50 phút', '1 giờ', '2 giờ', '3 giờ'],

  randomTimeAgo = Math.floor(Math.random() * randomTime.length),

  randomProduct = Math.floor(Math.random() * collection.length),

  randomShowP = collection[randomProduct],

  TimeAgo = randomTime[randomTimeAgo];

  $(".jas-sale-pop").html(randomShowP);

  $('.jas-sale-pop-timeago').text('Đã được mua cách đây ' + TimeAgo);

  $(this).addClass('slideUp');

  $('.pe-7s-close').on('click', function() {

  $('.jas-sale-pop').remove();

  });

  }).delay(15000);

  }, 5000);

  }



//]]>

</script>

<!-- end thong bao san pham -->



Đăng bởi : Mang Hung Yen Chia sẻ code thông báo sản phẩm góc trái cho blogspot Đánh giá: 9.1 / 10

0 Nhận xét