| Server IP : 103.48.194.25 / Your IP : 216.73.217.33 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/ngoaingusonganh.com-bk/public_html/skin/temp/news_files/ |
Upload File : |
$(document).ready(function ($) {
awe_backtotop();
awe_owl();
awe_category();
awe_menumobile();
awe_tab();
$('.footer-inner .footer-widget h3').on('click', function(e){
e.preventDefault();
var $this = $(this);
$this.parents('.footer-inner .footer-widget').find('ul').stop().slideToggle();
$(this).toggleClass('active')
return false;
});
$('#trigger-mobile').click(function() {
$(".c-menu--slide-left").addClass('active');
$(".backdrop__body-backdrop___1rvky").addClass('active');
});
$('#close-nav').click(function() {
$(".c-menu--slide-left").removeClass('active');
$(".backdrop__body-backdrop___1rvky").removeClass('active');
});
$('.backdrop__body-backdrop___1rvky').click(function() {
$(".c-menu--slide-left").removeClass('active');
$(".backdrop__body-backdrop___1rvky").removeClass('active');
});
$('.ng-has-child1 a .fa1').on('click', function(e){
e.preventDefault();
var $this = $(this);
$this.parents('.ng-has-child1').find('.ul-has-child1').stop().slideToggle();
$(this).toggleClass('active')
return false;
});
$('.ng-has-child1 .ul-has-child1 .ng-has-child2 a .fa2').on('click', function(e){
e.preventDefault();
var $this = $(this);
$this.parents('.ng-has-child1 .ul-has-child1 .ng-has-child2').find('.ul-has-child2').stop().slideToggle();
$(this).toggleClass('active')
return false;
});
$('.nav-search .show-search').click(function(e){
e.stopPropagation();
$( ".nav-search .header-main-des" ).toggle( "fast", function() {
});
});
$('.mobile-search a').click(function(e){
e.stopPropagation();
$( ".header-main .search-mb" ).toggle( "fast", function() {
});
});
$(document).on('click', '.btn-buy-now-click', function(e) {
e.preventDefault();
$('[data-role=addtocart]').click();
});
});
$('a.btn-support').click(function(e){
e.stopPropagation();
$('.support-content').slideToggle();
});
$('.support-content, .nav-search .header-main-des').click(function(e){
e.stopPropagation();
});
$(document).on('click', function () {
$('.nav-search .header-main-des').slideUp();
});
$(document).on('click', function () {
$('.support-content').slideUp();
});
$(window).on("load resize",function(e){
setTimeout(function(){
awe_resizeimage();
},200);
setTimeout(function(){
awe_resizeimage();
},1000);
});
$(document).on('click','.overlay, .close-popup, .btn-continue, .fancybox-close', function() {
hidePopup('.awe-popup');
setTimeout(function(){
$('.loading').removeClass('loaded-content');
},500);
return false;
})
/********************************************************
# SHOW NOITICE
********************************************************/
function awe_showNoitice(selector) {
$(selector).animate({right: '0'}, 500);
setTimeout(function() {
$(selector).animate({right: '-300px'}, 500);
}, 3500);
} window.awe_showNoitice=awe_showNoitice;
/********************************************************
# SHOW LOADING
********************************************************/
function awe_showLoading(selector) {
var loading = $('.loader').html();
$(selector).addClass("loading").append(loading);
} window.awe_showLoading=awe_showLoading;
/********************************************************
# HIDE LOADING
********************************************************/
function awe_hideLoading(selector) {
$(selector).removeClass("loading");
$(selector + ' .loading-icon').remove();
} window.awe_hideLoading=awe_hideLoading;
/********************************************************
# SHOW POPUP
********************************************************/
function awe_showPopup(selector) {
$(selector).addClass('active');
} window.awe_showPopup=awe_showPopup;
/********************************************************
# HIDE POPUP
********************************************************/
function awe_hidePopup(selector) {
$(selector).removeClass('active');
} window.awe_hidePopup=awe_hidePopup;
/********************************************************
# CONVERT VIETNAMESE
********************************************************/
function awe_convertVietnamese(str) {
str= str.toLowerCase();
str= str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a");
str= str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e");
str= str.replace(/ì|í|ị|ỉ|ĩ/g,"i");
str= str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o");
str= str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u");
str= str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y");
str= str.replace(/đ/g,"d");
str= str.replace(/!|@|%|\^|\*|\(|\)|\+|\=|\<|\>|\?|\/|,|\.|\:|\;|\'| |\"|\&|\#|\[|\]|~|$|_/g,"-");
str= str.replace(/-+-/g,"-");
str= str.replace(/^\-+|\-+$/g,"");
return str;
} window.awe_convertVietnamese=awe_convertVietnamese;
/********************************************************
# RESIDE IMAGE PRODUCT BOX
********************************************************/
function awe_resizeimage() {
$('.product-box .product-thumbnail a img').each(function(){
var t1 = (this.naturalHeight/this.naturalWidth);
var t2 = ($(this).parent().height()/$(this).parent().width());
if(t1<= t2){
$(this).addClass('bethua');
}
var m1 = $(this).height();
var m2 = $(this).parent().height();
if(m1 <= m2){
$(this).css('padding-top',(m2-m1)/2 + 'px');
}
})
} window.awe_resizeimage=awe_resizeimage;
/********************************************************
# SIDEBAR CATEOGRY
********************************************************/
function awe_category(){
$('.nav-category .ion-chevron-down').click(function(e){
$(this).parent().toggleClass('active');
});
} window.awe_category=awe_category;
/********************************************************
# MENU MOBILE
********************************************************/
function awe_menumobile(){
$('.menu-bar').click(function(e){
e.preventDefault();
$('#nav').toggleClass('open');
});
$('#nav .fa').click(function(e){
e.preventDefault();
$(this).parent().parent().toggleClass('open');
});
} window.awe_menumobile=awe_menumobile;
/********************************************************
# ACCORDION
********************************************************/
function awe_accordion(){
$('.accordion .nav-link').click(function(e){
e.preventDefault;
$(this).parent().toggleClass('active');
})
} window.awe_accordion=awe_accordion;
/********************************************************
# OWL CAROUSEL
********************************************************/
function awe_owl() {
$('.owl-carousel:not(.not-dqowl)').each( function(){
var xs_item = $(this).attr('data-xs-items');
var md_item = $(this).attr('data-md-items');
var sm_item = $(this).attr('data-sm-items');
var margin=$(this).attr('data-margin');
var dot=$(this).attr('data-dot');
if (typeof margin !== typeof undefined && margin !== false) {
} else{
margin = 30;
}
if (typeof xs_item !== typeof undefined && xs_item !== false) {
} else{
xs_item = 1;
}
if (typeof sm_item !== typeof undefined && sm_item !== false) {
} else{
sm_item = 3;
}
if (typeof md_item !== typeof undefined && md_item !== false) {
} else{
md_item = 3;
}
if (typeof dot !== typeof undefined && dot !== true) {
dot= true;
} else{
dot = false;
}
$(this).owlCarousel({
loop:false,
margin:Number(margin),
responsiveClass:true,
dots:dot,
nav:true,
navText: ["<i class='ion-chevron-left' aria-hidden='true'></i>","<i class='ion-chevron-right' aria-hidden='true'></i>"],
responsive:{
0:{
items:Number(xs_item)
},
600:{
items:Number(sm_item)
},
1000:{
items:Number(md_item)
}
}
})
})
} window.awe_owl=awe_owl;
/********************************************************
# BACKTOTOP
********************************************************/
function awe_backtotop() {
if ($('.back-to-top').length) {
var scrollTrigger = 100, // px
backToTop = function () {
var scrollTop = $(window).scrollTop();
if (scrollTop > scrollTrigger) {
$('.back-to-top').addClass('show');
} else {
$('.back-to-top').removeClass('show');
}
};
backToTop();
$(window).on('scroll', function () {
backToTop();
});
$('.back-to-top').on('click', function (e) {
e.preventDefault();
$('html,body').animate({
scrollTop: 0
}, 700);
});
}
} window.awe_backtotop=awe_backtotop;
/********************************************************
# TAB
********************************************************/
function awe_tab() {
$(".e-tabs").each( function(){
$(this).find('.tabs-title li:first-child').addClass('current');
$(this).find('.tab-content').first().addClass('current');
$(this).find('.tabs-title li').click(function(){
var tab_id = $(this).attr('data-tab');
var url = $(this).attr('data-url');
$(this).closest('.e-tabs').find('.tab-viewall').attr('href',url);
$(this).closest('.e-tabs').find('.tabs-title li').removeClass('current');
$(this).closest('.e-tabs').find('.tab-content').removeClass('current');
$(this).addClass('current');
$(this).closest('.e-tabs').find("#"+tab_id).addClass('current');
});
});
} window.awe_tab=awe_tab;
/********************************************************
# DROPDOWN
********************************************************/
$('.dropdown-toggle').click(function() {
$(this).parent().toggleClass('open');
});
$('.btn-close').click(function() {
$(this).parents('.dropdown').toggleClass('open');
});
$('body').click(function(event) {
if (!$(event.target).closest('.dropdown').length) {
$('.dropdown').removeClass('open');
};
});
$(document).on('keydown','#qty, #quantity-detail, .number-sidebar',function(e){-1!==$.inArray(e.keyCode,[46,8,9,27,13,110,190])||/65|67|86|88/.test(e.keyCode)&&(!0===e.ctrlKey||!0===e.metaKey)||35<=e.keyCode&&40>=e.keyCode||(e.shiftKey||48>e.keyCode||57<e.keyCode)&&(96>e.keyCode||105<e.keyCode)&&e.preventDefault()});