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://3.bp.blogspot.com/-H17oPbDgG8s/XR1beuz098I/AAAAAAAASHI/SwpcYyMZvS4WXzuBx56LdLGpF5nG-stOgCLcBGAs/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://1.bp.blogspot.com/-8BZh5EHAVs8/XTLO6Bv3g-I/AAAAAAAASkk/71xu4qIDsMIcYu4Yz4HIFqRwSIeaUdwBACLcBGAs/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://2.bp.blogspot.com/-hcJ6XK38lcc/XRTz72JMSxI/AAAAAAAASBI/l_fYTDUZFeAAbxzAYQMFDaqPawwHLFnBgCLcBGAs/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 -->



Xem thêm