}); }, 2000); $().ready(function(){ var $fb=0,$tw=0,$gg=0,valstack=0; var width=520,height=350,top=(screen.height/2)-(height/2),left=(screen.width/2)-(width/2); $('.share-bottom.fb').click(function(){ window.open('https://www.facebook.com/sharer/sharer.php?s100&u=https://notebookspec.com/%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a-10-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%97%e0%b9%87%e0%b8%9a%e0%b9%80%e0%b8%a5/265885/' , '' , 'top='+top+',left='+left+',toolbar=0,width='+width+',height='+height); }); $('.share-bottom.tw').click(function(){ window.open('https://twitter.com/intent/tweet?text=จัดอันดับ 10 อันดับแท็บเล็ตที่มีแบตเตอรี่อึดที่สุด ใช้งานได้ยาวนานที่สุด ในขณะนี้&url=https://notebookspec.com/%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a-10-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%97%e0%b9%87%e0%b8%9a%e0%b9%80%e0%b8%a5/265885/' , '' , 'top='+top+',left='+left+',toolbar=0,width='+width+',height='+height); }); $('.share-bottom.gg').click(function(){ window.open('https://plus.google.com/share?title=จัดอันดับ 10 อันดับแท็บเล็ตที่มีแบตเตอรี่อึดที่สุด ใช้งานได้ยาวนานที่สุด ในขณะนี้&url=https://notebookspec.com/%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a-10-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%97%e0%b9%87%e0%b8%9a%e0%b9%80%e0%b8%a5/265885/' , '' , 'top='+top+',left='+left+',toolbar=0,width='+width+',height='+height); }); $.get('/social_network/fbCount.php?url=https://notebookspec.com/%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a-10-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%97%e0%b9%87%e0%b8%9a%e0%b9%80%e0%b8%a5/265885/', function(res){ stackcount(res);}); $.get('/social_network/twCount.php?url=https://notebookspec.com/%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a-10-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%97%e0%b9%87%e0%b8%9a%e0%b9%80%e0%b8%a5/265885/', function(res){ stackcount(res);}); $.get('/social_network/ggCount.php?url=https://notebookspec.com/%e0%b8%88%e0%b8%b1%e0%b8%94%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a-10-%e0%b8%ad%e0%b8%b1%e0%b8%99%e0%b8%94%e0%b8%b1%e0%b8%9a%e0%b9%81%e0%b8%97%e0%b9%87%e0%b8%9a%e0%b9%80%e0%b8%a5/265885/', function(res){ stackcount(res);}); function stackcount(val){ valstack = $('#sharecount').text(); allshared = parseInt(valstack) + parseInt(val); $('#sharecount').html(numberWithCommas(allshared)); } $.getJSON('/web/get_content_meta.php?id=265885',function(data){ $('.meta_view').html(numberWithCommas(data.view)); $('.meta_comment').html(numberWithCommas(data.comment)); }); }); function numberWithCommas(x) { //add comma return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }