
Nhận chức hay nhậm chức đúng chính tả?
‘); $(‘#over’).fadeIn(300); return false; }); $(“#btn-feedback”).on(“click”, function () { var loginBox = $(this).attr(‘href’); //cho hiện hộp đăng nhập trong 300ms $(loginBox).fadeIn(300); // thêm phần tử id=”over” vào sau body $(‘body’).append(”); $(‘#over’).fadeIn(300); return false; }); // khi click đóng hộp thoại $(document).on(‘click’, “.close1, #over,.btn-cancel”, function () { $(‘#over, .lgh-modal-dialog’).fadeOut(300, function () { $(‘#over’).remove(); }); return false; }); }) function closeModal() { $(‘#over, .lgh-modal-dialog’).fadeOut(300, function () { $(‘#over’).remove(); }); return false; } $(“.feedback-mulsol”).on(“click”, function () { var content2 = $(“#feedback_content2”).val(); var phone = $(“#fbphone”).val(); var timeContact = $(“#fb-time-contact”).val(); var note = $(“#fb-note”).val(); // Câu1Cách2 var sub_article_id = $(“#fb-sub-article-id”).val(); var sub_article_lvl2 = $(“#fbsub-article-lvl2”).val(); var feedCaptChaResponse = $(“#g-recaptcha-response”).val() if (feedCaptChaResponse == ”) { alert(‘Vui lòng tick chọn vào ô mã xác thực.’); return; } $.ajax({ type: “POST”, url: ‘/tsAjax/feedBackReview’, data: { content: content2, phone: phone, time_contact: timeContact, post_id:160811, cat_id:1790, sub_article_id:sub_article_id, sub_article_lvl2:sub_article_lvl2, note:note, captcha_response: feedCaptChaResponse, }, success: function (resp) { try { grecaptcha.reset(); grecaptcha.render(‘g-recaptchafb’, { ‘sitekey’: ‘6Ld7UwolAAAAAF9diamiRDcptD8335eOuCw2cSMs’ }); } catch (err) { console.log(err); } if (resp == 1) { $(“#feedback_content2″).val(”); $(“#fbphone”).val(”); $(“#fb-time-contact”).val(”); $(“#fb-note”).val(”); // Câu1Cách2 $(“#fb-sub-article-id”).val(”); $(“#fbsub-article-lvl2″).val(”); alert(” Góp ý thành công. Hãy thường xuyên góp ý nhé”); closeModal(); }else if(resp != 0){ alert(resp); } } }); }); $(“#btn-send-feedback”).on(“click”, function () { var choice = $(‘input[type=”radio”][name=”feedback”]:checked’).val(); var content = $(“#feedback_content”).val(); if (!choice || content == “”) { alert(“Bạn chưa lựa chọn ý kiến”); return false; } var captcha_response_bt = $(“#g-recaptcha-response-1″).val(); if (captcha_response_bt == ”) { alert(‘Vui lòng tick chọn vào ô mã xác thực.’); return; } $.ajax({ type: “POST”, url: ‘/tsAjax/feedBack’, data: { type_feedback: choice, content: content, post_id:160811, cat_id:1790, captcha_response: captcha_response_bt, }, success: function (resp) { if (resp == 1) { $(“#feedback_content”).val(“”); $(‘input[type=”radio”][name=”feedback”]’).attr(‘checked’, false); alert(`Loigiaihay đã ghi nhận báo lỗi của bạn. Nếu có thêm bất kì góp ý nào, bạn vui lòng gửi về fanpage loigiaihay.com để trao đổi trực tiếp với admin!`); closeModal(); }else if(resp != 0){ alert(resp); } } }); }); $(“#btn-send-review-item”).on(“click”, function () { var content = $(“#review_content”).val(); var start_review = $(“#count-start-review”).val(); var username = $(“#username”).val(); var user_info = $(“#user_info”).val(); if(content == ”){alert(‘Bạn chưa nhập nội dung báo lỗi!’); return false;} $.ajax({ url: ‘/detail/ajaxUpdateRating’, type: “post”, data: ({ article_id: $(“#content_article_id”).val(), star_count: start_review, content: content, username: username, user_info: user_info }), success: function (resp) { var data = jQuery.parseJSON(resp); if (data.success) { $(“.kksr-legend”).html(‘Cảm ơn bạn đã vote’); has_rated = true; sendGAEvent(“track-rating”, “rating-” + rated_value + “-star”, “rating-for-article-” + $(“#content_article_id”).val(), rated_value); $(‘#review-item .modal-body *’).remove(); $(‘#review-item .modal-footer’).remove(); $(‘#review-item .modal-body’).append(‘
Cám ơn bạn đã góp ý!
‘); setTimeout(function () { closeModal(); },2000) } } }); }); function scrollToDiv(to_id) { $(‘html, body’).animate({scrollTop: ($(‘#’ + to_id).offset().top – 50)}, ‘fast’); } (adloca + 620) ) { $(‘#ad_right_300x250_2’).css(‘position’, ‘fixed’); $(‘#ad_right_300x250_2’).css(‘top’, ‘0px’); $(‘#ad_right_300x250_2’).css(‘z-index’, ‘200’); } if (curloca p”).length; if(display_type == 1){ //22843: chua the div trong content ::: OK? De bai – Loi giai => đặt vào trước lời giải chi tiết $(‘.box_above’).insertAfter($(“#box-content > p”).eq(Math.floor(count_el_p/3 * 2) – 1)); }else if(display_type == 2){ var count_el_box_q = $(“#box-content .box-question”).length; $(‘.box_above’).insertAfter($(“#box-content .box-question”).eq(Math.ceil(count_el_box_q/2) – 1)); }else if(display_type == 0){ //=> OK. Loai binh thuong, chi co content $(‘.box_above’).insertAfter($(“#box-content > p”).eq(Math.floor(count_el_p/3 * 2) – 1)); } $( “.simple_audio_data” ).each(function( index ) { var simple_audio_src = $(this).attr(‘audio_src’); var parent_simple_audio_src = $(this).parents(‘p’); var htmlAppend = ”; if(simple_audio_src && simple_audio_src != ”){ htmlAppend += ‘ ‘ + ‘
‘ + ‘
‘+vocabulary+’ ‘}; if(spelling && spelling != ”){html += spelling+”}; if(audio_src && audio_src != ”){ html += ‘ ‘ + ‘
‘ + ‘
‘+mean_word+”}; if(sentences_example && sentences_example != ”){html += ‘
‘+sentences_example+ ‘ ‘}; if(sentences_example1 && sentences_example1 != ”){html += ‘
‘+sentences_example1+ ‘ ‘}; if(audio_example1 && audio_example1 != ”){ html += ‘ ‘ + ‘
‘ + ‘
(‘+translate_example1+’)
‘}; if(sentences_example2 && sentences_example2 != ”){html += ‘ ‘+sentences_example2+’ ‘}; if(audio_example2 && audio_example2 != ”){ html += ‘ ‘ + ‘
‘ + ‘
(‘+translate_example2+’)
‘}; if(sentences_example3 && sentences_example3 != ”){html += ‘- ‘+ sentences_example3+’ ‘}; if(audio_example3 && audio_example3 != ”){ html += ‘ ‘ + ‘
‘ + ‘
(‘+translate_example3+’)
‘}; html += ‘]]>
‘;
if(img_des && img_des != ”){html += ‘‘};
$(this).remove();
parent.append(html);
parent.addClass(‘block-vocabulary’);
});
$(“.audio-not-active”).on(“click”, function () {
var index = $(this).data(‘index’);
var x = document.getElementById(“audio-“+index);
if(index !== undefined && x){
x.play();
$(this).parent().addClass(‘active’);
x.onended = function() { $(this).parent().removeClass(‘active’);};
return ;
}
index = $(this).data(‘example1-index’);
x = document.getElementById(“audio-example1-“+index);
if(index && x){
x.play();
$(this).parent().addClass(‘active’);
x.onended = function() { $(this).parent().removeClass(‘active’);};
return ;
}
index = $(this).data(‘example2-index’);
x = document.getElementById(“audio-example2-“+index);
if(index && x){
x.play();
$(this).parent().addClass(‘active’);
x.onended = function() { $(this).parent().removeClass(‘active’);};
return ;
}
index = $(this).data(‘example3-index’);
x = document.getElementById(“audio-example3-“+index);
if(index && x){
x.play();
$(this).parent().addClass(‘active’);
x.onended = function() { $(this).parent().removeClass(‘active’)};
return ;
}
});
})
var listConceptData = “;
if (listConceptData) listConceptData = JSON.parse(listConceptData);
const tooltips = Array.from(document.querySelectorAll(“a[data-conceptid]”));
const tooltipContainer = document.querySelector(“.tooltip-concept-container”);
const tooltipContainerContent = document.querySelector(“.tooltip-concept-content”);
var tooltipID;
var conceptPreviewing = false;
var conceptContainerPreviewing = false;
function checkShowPreviewConcept() {
if (conceptPreviewing == false && conceptContainerPreviewing == false) {
tooltipContainer.classList.remove(“fade-in”);
}
}
tooltips.forEach((tooltip) => {
tooltip.addEventListener(“mouseover”, (e) => {
var conceptid = e.target.getAttribute(‘data-conceptid’);
if (conceptid in listConceptData) {
tooltipContainer.classList.add(“fade-in”);
/* tooltipContainer.style.left = `${e.pageX}px`;
tooltipContainer.style.top = `${e.pageY}px`;*/
var distanceToTop = tooltip.getBoundingClientRect().top;
if (distanceToTop > 220) {
tooltipContainer.style.left = `${tooltip.offsetLeft}px`;
tooltipContainer.style.top = `${tooltip.offsetTop – 210}px`;
//tooltipContainer.classList.add(‘tooltipc-top’).remove(‘tooltipc-bottom’);
tooltipContainerContent.innerHTML = listConceptData[conceptid];
//tooltipContainerContent.innerHTML = ‘content’;
conceptPreviewing = true;
} else {
tooltipContainer.style.left = `${tooltip.offsetLeft}px`;
tooltipContainer.style.top = `${tooltip.offsetTop + 30}px`;
// tooltipContainer.classList.add(‘tooltipc-bottom’).remove(‘tooltipc-top’);
tooltipContainerContent.innerHTML = listConceptData[conceptid];
//tooltipContainerContent.innerHTML = ‘content’;
conceptPreviewing = true;
}
}
});
tooltip.addEventListener(“mouseleave”, (e) => {
conceptPreviewing = false;
setTimeout(checkShowPreviewConcept, 1500);
});
});
tooltipContainer.addEventListener(‘mouseover’, () => {
tooltipContainer.classList.add(“fade-in”);
conceptContainerPreviewing = true;
})
tooltipContainer.addEventListener(‘mouseleave’, () => {
conceptContainerPreviewing = false;
setTimeout(checkShowPreviewConcept, 1500);
})
$(document).ready(function (){
if ($(“.lgh-quizlet-menu li”).length) {
$(“.lgh-quizlet-menu li”).eq(0).addClass(“active”);
}
$(“.lgh-quizlet-menu li”).on(“click”, function (){
var quizletIf = $(this).data(‘quizlet’);
$(“.lgh-quizlet-content”).html(‘‘); $(“.lgh-quizlet-menu li”).removeClass(“active”); $(this).addClass(“active”); }); $(“li.sub-article-group ul a”).on(“click”, function(e) { $(‘li.sub-article-group’).removeClass(“active”); $(‘li.no-sub-article-group’).removeClass(“active”); $(this).closest(‘li.sub-article-group’).addClass(“active”); }); $(“li.sub-article-group > a”).on(“click”, function(e) { $(‘li.sub-article-group’).removeClass(“active”); $(‘li.no-sub-article-group’).removeClass(“active”); $(this).closest(‘li.sub-article-group’).addClass(“active”); var divScroll = $(this).closest(‘li.sub-article-group.active’).find(“ul li:first a”).eq(0).data(“scroll”); if (divScroll) { $(‘html, body’).animate({ scrollTop: $(“#”+divScroll).offset().top-100 }, 250); } }); $(“li.no-sub-article-group a”).on(“click”, function(e) { $(‘li.sub-article-group’).removeClass(“active”); $(‘li.no-sub-article-group’).removeClass(“active”); $(this).closest(‘li’).addClass(“active”); }); }); strong”).on(“click”, function() { $(this).next().trigger(“click”); }); $(“.explanation-tab-title-bottom > strong”).on(“click”, function() { $(this).next().trigger(“click”); }); $(“.explanation-title2”).on(“click”, function (){ var exId = $(this).data(“idx”); var exText = ‘160811’; exText += $(this).data(‘label’); exText = exText.replace(/s/g, ”); var exTab = $(this).closest(“.section-explanation-tab”); //var exTabTitleTop = exTab.find(“.explanation-tab-title-top”); var exTabTitleBt = exTab.find(“.explanation-tab-title-bottom”); exTabTitleBt.show(); exTab.find(“.explanation-title2”).css({‘background’: ‘#f1f3f4’, color: ‘#1270E3’}); exTab.find(‘.explanation-title-idx’+exId).css({‘background’: ‘#cce5ff’, color: ‘#1270E3’}); exTab.find(“.explanation-content2”).hide(); exTab.find(“.explanation-content-idx”+exId).show(); $(‘#fb-note’).val(exText); window.dataLayer.push({ ‘event’ : ‘track-user-event’, ‘lgh_event_action’ : ‘see_more_solutions’, ‘lgh_event_category’ : ‘track_article’, ‘lgh_event_label’ : exText, ‘lgh_event_value’ : parseInt(160811), }); }); }); ]]>
Source