').insertAfter(obj.parent().parent().parent()); //$('.box-reply').slideDown(); $('.box-reply').slideDown(function(event) { // console.log('get_report_comment 3' ); }); event.preventDefault(); event.stopPropagation(); } , get_hide_abuse: function() { $('.box-reply').slideUp(function() { // Animation complete. $(this).remove(); }); } } $(function(){ g_comment.initial_comment(); if (window.location.href.indexOf('view_comment=1') != -1) { g_comment.is_auto_show_comment(); } }); /* แสดง|ซ่อน title และ social share เมื่อ scroll mouse ขึ้น|ลง */ $(function(){ if($(window).width() > 991){ var position = $('#position-set').offset(); $(window).scrPosition(function(a){ if(a == "up"){ var getScrollTop = $(this).scrollTop(); if(getScrollTop > position.top) { $(".article-headline-fixed").show(); $("header.sticky .menu-list ul li:last-child").css('z-index','-1'); } }else{ $(".article-headline-fixed").hide(); $("header.sticky .menu-list ul li:last-child").css('z-index','1'); } }); } }); (function(j,d,w){ j.fn.scrPosition = function(callback){ var position; var scrollPosition = j(this).scrollTop(); j(this).scroll(function(){ var scrollTop = j(this).scrollTop(); if(scrollPosition < scrollTop) position = "up" else position = "down" scrollPosition = scrollTop; callback(position); }); }; })(jQuery,document,window); if(g_page_type == 'article'){ var g_like_article = { fn_like_unlike : function (src_id , status){ if (src_id == '' && status == '') { //console.log('content :' +src_id +' >> return false '); return false; } if (typeof status === 'undefined') { // only show like/unlike (not set) //console.log('content >> undefined '); status = 99; } $.post("/ajax/_getLikeUnlike.php", { src_id : src_id , status : status , act : 'CONV3'}, function(data) { //console.log('data =>' + data); if (data != '') { $('div#like-dislike-article.f-comment').html(data); } return false; }); }, fn_show_block : function (content_id){ this.fn_like_unlike(content_id); // this.fn_like_unlike(content_id,1); // this.fn_like_unlike(content_id,0); } } }