- ID de l'analyse :
- cedd152e-daf9-45da-93df-1d242a99ee0fTerminée
- URL soumise :
- https://tongthe365.com/card/the-garena
- Fin du rapport :
Liens : 0 trouvé(s)
Liens sortants identifiés à partir de la page
Variables JavaScript : 10 trouvée(s)
Les variables JavaScript globales chargées dans l'objet fenêtre d'une page sont des variables déclarées en dehors des fonctions et accessibles depuis n'importe quel endroit du code au sein du champ d'application actuel
Nom | Type |
---|---|
onbeforetoggle | object |
documentPictureInPicture | object |
onscrollend | object |
$ | function |
jQuery | function |
bootstrap | object |
flatpickr | function |
vn | object |
Swiper | function |
checkInputQty | function |
Messages de journal de console : 0 trouvé(s)
Messages consignés dans la console web
HTML
Le corps HTML de la page en données brutes
<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta http-equiv="content-language" content="vi">
<meta name="robots" content="index, follow'">
<title></title>
<meta name="description" content="">
<meta name="keywords" content="">
<!-- Open Graph data -->
<meta property="og:title" content="">
<meta property="og:type" content="article">
<meta property="og:url" content="https://tongthe365.com/card/the-garena">
<meta property="og:image" content="https://tongthe365.com/storage/userfiles/images/thecao/the-garena.png">
<meta property="og:description" content="">
<meta property="og:site_name" content="">
<meta property="article:published_time" content="2024-11-01T14:19:50+07:00">
<meta property="article:modified_time" content="2024-11-01T14:19:50+07:00">
<meta property="article:section" content="">
<meta property="article:tag" content="">
<!-- Twitter Card data -->
<meta name="twitter:card" content="https://tongthe365.com/storage/userfiles/images/thecao/the-garena.png">
<meta name="twitter:site" content="@wmt24h">
<meta name="twitter:title" content="">
<meta name="twitter:description" content="">
<meta name="twitter:creator" content="@wmt24h">
<meta name="twitter:image:src" content="https://tongthe365.com/storage/userfiles/images/thecao/the-garena.png">
<link rel="alternate" hreflang="vi-vn" href="https://tongthe365.com/card/the-garena">
<link rel="canonical" href="https://tongthe365.com/card/the-garena">
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "",
"logo": "https://tongthe365.com/storage/userfiles/images/thecao/the-garena.png",
"category": "Gaming",
"image": "https://tongthe365.com/storage/userfiles/images/thecao/the-garena.png",
"description": "",
"brand": {
"@type": "Thing",
"name": "Garena"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": "1289"
}
}
</script>
<meta name="csrf-token" content="9igWdEvQNHmi0jMqwVIseLMtvMPwzzjAiL7JKXCx">
<link rel="shortcut icon" href="https://tongthe365.com/storage/images/53/66f9128e26955_bcdd3484-9dbb-4357-91b8-d722bb61e986.jpg">
<style>
:root {
--primary-color: #0b5c95;
--primary-hover: #0c2a6b;
--primary-rgb: 1, 36, 103;
}
</style>
<link rel="icon" href="https://tongthe365.com/storage/images/53/66f9128e26955_bcdd3484-9dbb-4357-91b8-d722bb61e986.jpg">
<link rel="apple-touch-icon" href="https://tongthe365.com/storage/images/53/66f9128e26955_bcdd3484-9dbb-4357-91b8-d722bb61e986.jpg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://tongthe365.com/assets/default/plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="https://tongthe365.com/assets/default/plugins/bootstrap-flatpickr/bootstrap-flatpickr.min.css">
<link rel="stylesheet" href="https://tongthe365.com/assets/default/plugins/select2/css/select2.min.css">
<link rel="stylesheet" href="https://tongthe365.com/assets/default/plugins/swiper/swiper-bundle.min.css">
<link rel="stylesheet" href="https://tongthe365.com/assets/default/fonts/fontawesome/css/all.min.css">
<link rel="stylesheet" href="https://tongthe365.com/assets/default/css/style.css">
</head>
<body>
<header id="header-m1" class="header-m1">
<div class="container d-flex align-items-center flex-lg-wrap">
<div class="header-hamburger" id="call-navigation">
<span></span>
</div>
<a class="header-logo" href="https://tongthe365.com">
<img src="https://tongthe365.com/storage/images/53/66f9128e26b65_bcdd3484-9dbb-4357-91b8-d722bb61e986.jpg" height="40px" alt="TONGTHE365.COM">
</a>
<div class="header-navigation">
<ul class="list-unstyled mb-0">
<li class="d-lg-none d-inline-block navigation-logo text-center">
<a href="https://tongthe365.com">
<img src="https://tongthe365.com/storage/images/53/66f9128e26b65_bcdd3484-9dbb-4357-91b8-d722bb61e986.jpg" height="40px" class="img-fluid" alt="TONGTHE365.COM">
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/card">
Mua mã thẻ
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/doithecao">
Đổi thẻ cào
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/recharge/nap-tien-game">
Nạp Game
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/recharge">
Nạp tiền điện thoại
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/recharge/dang-ky-data">
Đăng ký Data
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/wallet/list">
Nạp tiền
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/wallet/withdraw/vnd">
Rút Tiền
</a>
</li>
<li class="d-inline-block ">
<a href="https://tongthe365.com/news">
Tin tức
</a>
</li>
</ul>
</div>
<div class="header-user">
<div class="header-nologin">
<a href="https://tongthe365.com/customer/register" class="btn btn-small btn-register">
<i class="fas fa-user"></i> Đăng ký
</a>
<a href="https://tongthe365.com/customer/login" class="btn btn-small btn-login">
<i class="fas fa-lock"></i> Đăng nhập
</a>
</div>
</div>
<div class="header-usermb">
<button type="button" class="btn" id="call-userMB">
<i class="fas fa-user"></i>
Tài khoản </button>
<div class="header-usermb_list">
<ul class="list-unstyled mb-0">
<li class="d-inline-block text-center header-usermb_list__logo">
<a href="https://tongthe365.com">
<img src="https://tongthe365.com/storage/images/53/66f9128e26b65_bcdd3484-9dbb-4357-91b8-d722bb61e986.jpg" height="40px" alt="TONGTHE365.COM">
</a>
</li>
<li class="d-inline-block">
<a href="https://tongthe365.com/customer/register">
<i class="fa fa-angle-right"></i> <strong>Đăng ký</strong>
</a>
</li>
<li class="d-inline-block">
<a href="https://tongthe365.com/customer/login">
<i class="fa fa-angle-right"></i> <strong>Đăng nhập</strong>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="header-overlay" id="header-overlay"></div>
</header>
<div id="main" class="main">
<div class="section-breadcrumb">
<div class="container">
<ol class="breadcrumb bg-transparent rounded-0 mb-0 p-0">
<li class="breadcrumb-item">
<a href="https://tongthe365.com">Trang chủ</a>
</li>
<li class="breadcrumb-item">
<a href="https://tongthe365.com/card">Mua mã thẻ</a>
</li>
</ol>
</div>
</div>
<div class="section-gap">
<div class="container">
<div class="description mb-3">
<div class="title">
<img src="https://tongthe365.com/storage/userfiles/images/thecao/the-garena.png" style="max-height: 30px; width: auto;">Thẻ Garena
</div>
</div>
<div class="tabs-m1 mt-5">
<div class="row">
<div class="col-xl-8 col-lg-7">
<div class="tab-content mb-5">
<div class="tab tab-pane fade active show">
<div class="row row10">
<div class="col-lg-3 col-4">
<div class="card-price sc-item-btn " title="Garena 20.000đ" data-id="9225" id="item-9225" data-row="">
<svg width="30" height="28" viewBox="0 0 30 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.9636 18.8193C17.2561 19.5281 16.3136 19.9181 15.3123 19.9181C14.3111 19.9181 13.3686 19.5281 12.6612 18.8193L7.34863 13.507C6.64002 12.7993 6.25001 11.857 6.25001 10.8556C6.25001 9.8543 6.64002 8.912 7.34863 8.20454C8.0561 7.4957 8.99862 7.10569 9.99997 7.10569C11.0011 7.10569 11.9436 7.4957 12.6511 8.20454L15.3123 10.8643L22.6586 3.51823C20.2586 1.47205 17.1511 0.230835 13.7499 0.230835C6.15617 0.230835 0 6.38701 0 13.9805C0 21.5743 6.15617 27.7305 13.7499 27.7305C21.3435 27.7305 27.4996 21.5743 27.4996 13.9805C27.4996 12.5594 27.2836 11.1894 26.8835 9.89939L17.9636 18.8193Z" fill="white"></path>
<path d="M15.3123 17.4181C14.9923 17.4181 14.6723 17.2956 14.4286 17.0519L9.1163 11.7394C8.62741 11.2507 8.62741 10.4606 9.1163 9.97195C9.60496 9.48307 10.3948 9.48307 10.8837 9.97195L15.3123 14.4005L27.8661 1.84696C28.3548 1.3583 29.1446 1.3583 29.6335 1.84696C30.1222 2.33585 30.1222 3.12571 29.6335 3.6146L16.196 17.0519C15.9525 17.2956 15.6323 17.4181 15.3123 17.4181Z" fill="white"></path>
</svg>
<div class="text">
Garena 20.000đ
</div>
</div>
</div>
<div class="col-lg-3 col-4">
<div class="card-price sc-item-btn " title="Garena 50.000đ" data-id="9227" id="item-9227" data-row="">
<svg width="30" height="28" viewBox="0 0 30 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.9636 18.8193C17.2561 19.5281 16.3136 19.9181 15.3123 19.9181C14.3111 19.9181 13.3686 19.5281 12.6612 18.8193L7.34863 13.507C6.64002 12.7993 6.25001 11.857 6.25001 10.8556C6.25001 9.8543 6.64002 8.912 7.34863 8.20454C8.0561 7.4957 8.99862 7.10569 9.99997 7.10569C11.0011 7.10569 11.9436 7.4957 12.6511 8.20454L15.3123 10.8643L22.6586 3.51823C20.2586 1.47205 17.1511 0.230835 13.7499 0.230835C6.15617 0.230835 0 6.38701 0 13.9805C0 21.5743 6.15617 27.7305 13.7499 27.7305C21.3435 27.7305 27.4996 21.5743 27.4996 13.9805C27.4996 12.5594 27.2836 11.1894 26.8835 9.89939L17.9636 18.8193Z" fill="white"></path>
<path d="M15.3123 17.4181C14.9923 17.4181 14.6723 17.2956 14.4286 17.0519L9.1163 11.7394C8.62741 11.2507 8.62741 10.4606 9.1163 9.97195C9.60496 9.48307 10.3948 9.48307 10.8837 9.97195L15.3123 14.4005L27.8661 1.84696C28.3548 1.3583 29.1446 1.3583 29.6335 1.84696C30.1222 2.33585 30.1222 3.12571 29.6335 3.6146L16.196 17.0519C15.9525 17.2956 15.6323 17.4181 15.3123 17.4181Z" fill="white"></path>
</svg>
<div class="text">
Garena 50.000đ
</div>
</div>
</div>
<div class="col-lg-3 col-4">
<div class="card-price sc-item-btn " title="Garena 100.000đ" data-id="9228" id="item-9228" data-row="">
<svg width="30" height="28" viewBox="0 0 30 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.9636 18.8193C17.2561 19.5281 16.3136 19.9181 15.3123 19.9181C14.3111 19.9181 13.3686 19.5281 12.6612 18.8193L7.34863 13.507C6.64002 12.7993 6.25001 11.857 6.25001 10.8556C6.25001 9.8543 6.64002 8.912 7.34863 8.20454C8.0561 7.4957 8.99862 7.10569 9.99997 7.10569C11.0011 7.10569 11.9436 7.4957 12.6511 8.20454L15.3123 10.8643L22.6586 3.51823C20.2586 1.47205 17.1511 0.230835 13.7499 0.230835C6.15617 0.230835 0 6.38701 0 13.9805C0 21.5743 6.15617 27.7305 13.7499 27.7305C21.3435 27.7305 27.4996 21.5743 27.4996 13.9805C27.4996 12.5594 27.2836 11.1894 26.8835 9.89939L17.9636 18.8193Z" fill="white"></path>
<path d="M15.3123 17.4181C14.9923 17.4181 14.6723 17.2956 14.4286 17.0519L9.1163 11.7394C8.62741 11.2507 8.62741 10.4606 9.1163 9.97195C9.60496 9.48307 10.3948 9.48307 10.8837 9.97195L15.3123 14.4005L27.8661 1.84696C28.3548 1.3583 29.1446 1.3583 29.6335 1.84696C30.1222 2.33585 30.1222 3.12571 29.6335 3.6146L16.196 17.0519C15.9525 17.2956 15.6323 17.4181 15.3123 17.4181Z" fill="white"></path>
</svg>
<div class="text">
Garena 100.000đ
</div>
</div>
</div>
<div class="col-lg-3 col-4">
<div class="card-price sc-item-btn " title="Garena 200.000đ" data-id="9229" id="item-9229" data-row="">
<svg width="30" height="28" viewBox="0 0 30 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.9636 18.8193C17.2561 19.5281 16.3136 19.9181 15.3123 19.9181C14.3111 19.9181 13.3686 19.5281 12.6612 18.8193L7.34863 13.507C6.64002 12.7993 6.25001 11.857 6.25001 10.8556C6.25001 9.8543 6.64002 8.912 7.34863 8.20454C8.0561 7.4957 8.99862 7.10569 9.99997 7.10569C11.0011 7.10569 11.9436 7.4957 12.6511 8.20454L15.3123 10.8643L22.6586 3.51823C20.2586 1.47205 17.1511 0.230835 13.7499 0.230835C6.15617 0.230835 0 6.38701 0 13.9805C0 21.5743 6.15617 27.7305 13.7499 27.7305C21.3435 27.7305 27.4996 21.5743 27.4996 13.9805C27.4996 12.5594 27.2836 11.1894 26.8835 9.89939L17.9636 18.8193Z" fill="white"></path>
<path d="M15.3123 17.4181C14.9923 17.4181 14.6723 17.2956 14.4286 17.0519L9.1163 11.7394C8.62741 11.2507 8.62741 10.4606 9.1163 9.97195C9.60496 9.48307 10.3948 9.48307 10.8837 9.97195L15.3123 14.4005L27.8661 1.84696C28.3548 1.3583 29.1446 1.3583 29.6335 1.84696C30.1222 2.33585 30.1222 3.12571 29.6335 3.6146L16.196 17.0519C15.9525 17.2956 15.6323 17.4181 15.3123 17.4181Z" fill="white"></path>
</svg>
<div class="text">
Garena 200.000đ
</div>
</div>
</div>
<div class="col-lg-3 col-4">
<div class="card-price sc-item-btn " title="Garena 500.000đ" data-id="9231" id="item-9231" data-row="">
<svg width="30" height="28" viewBox="0 0 30 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.9636 18.8193C17.2561 19.5281 16.3136 19.9181 15.3123 19.9181C14.3111 19.9181 13.3686 19.5281 12.6612 18.8193L7.34863 13.507C6.64002 12.7993 6.25001 11.857 6.25001 10.8556C6.25001 9.8543 6.64002 8.912 7.34863 8.20454C8.0561 7.4957 8.99862 7.10569 9.99997 7.10569C11.0011 7.10569 11.9436 7.4957 12.6511 8.20454L15.3123 10.8643L22.6586 3.51823C20.2586 1.47205 17.1511 0.230835 13.7499 0.230835C6.15617 0.230835 0 6.38701 0 13.9805C0 21.5743 6.15617 27.7305 13.7499 27.7305C21.3435 27.7305 27.4996 21.5743 27.4996 13.9805C27.4996 12.5594 27.2836 11.1894 26.8835 9.89939L17.9636 18.8193Z" fill="white"></path>
<path d="M15.3123 17.4181C14.9923 17.4181 14.6723 17.2956 14.4286 17.0519L9.1163 11.7394C8.62741 11.2507 8.62741 10.4606 9.1163 9.97195C9.60496 9.48307 10.3948 9.48307 10.8837 9.97195L15.3123 14.4005L27.8661 1.84696C28.3548 1.3583 29.1446 1.3583 29.6335 1.84696C30.1222 2.33585 30.1222 3.12571 29.6335 3.6146L16.196 17.0519C15.9525 17.2956 15.6323 17.4181 15.3123 17.4181Z" fill="white"></path>
</svg>
<div class="text">
Garena 500.000đ
</div>
</div>
</div>
</div>
<div class="text-muted text-center mt-5 d-none d-lg-block">
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-5 mt-4 mt-lg-0">
<div class="overflow-hidden" id="shopping-cart-wrapper">
<div class="card card-cart overflow-hidden">
<div class="card-header py-2 px-3">
<div class="card-title mb-0 d-flex align-items-center justify-content-between">
Giỏ hàng
<span><i class="far fa-shopping-basket"></i></span>
</div>
</div>
<div class="card-body p-3 bg-white">
<div class="text-danger py-2 h6 text-center mb-0">
Giỏ hàng đang trống
</div>
</div>
</div>
</div>
<div class="text-muted text-center mt-4 d-block d-lg-none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer id="footer" class="footer">
<div class="container">
<div class="row">
<div class="col-md-3 my-4">
<div class="footer-item">
<strong class="text-bold">
TONGTHE365.COM
</strong>
<div class="footer-item_text">
Đại lý thẻ điện thoại, thẻ game trực tuyến, nạp tiền điện thoại. Thanh toán tự động, nhanh chóng và uy tín.
</div>
</div>
</div>
<div class="col-md-3 col-6 my-4">
<div class="footer-item">
<div class="footer-item_title">
Sản phẩm
</div>
<div class="footer-item_list">
<ul class="list-unstyled mb-0">
<li>
<a href="/card">Mua mã thẻ</a>
</li>
<li>
<a href="/doithecao">Đổi thẻ cào</a>
</li>
<li>
<a href="/recharge">Nạp topup</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-3 col-6 my-4">
<div class="footer-item">
<div class="footer-item_title">
Thông tin
</div>
<div class="footer-item_list">
<ul class="list-unstyled mb-0">
<li>
<a href="/news">Tin tức</a>
</li>
<li>
<a href="/merchant/list">Kết nối API</a>
</li>
<li>
<a href="/account/security">Bảo mật</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-3 my-4">
<div class="footer-item">
<div class="footer-item_title">
Liên hệ
</div>
<div class="footer-item_info">
<p>
<i class="fas fa-phone-alt"></i>
0962.514.097
</p>
<p>
<i class="fas fa-envelope"></i>
</p>
<p class="mt-3 d-flex align-items-center justify-content-start footer-item_info__social">
<a href="">
<i class="fab fa-facebook-f"></i>
</a>
<a href="">
<i class="fab fa-youtube"></i>
</a>
<a href="">
<i class="fab fa-twitter"></i>
</a>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="footer-bottom">
<div class="container">
<div class="row row-5 align-items-center">
<div class="col-6">
<a href="#" class="footer-bottom_copyright">© Software by Nencer Jsc.,</a>
</div>
<div class="col-6">
</div>
</div>
</div>
</div>
</footer>
<script type=" text/javascript" src="https://tongthe365.com/assets/default/plugins/jquery.min.js"></script>
<script type="text/javascript" src="https://tongthe365.com/assets/default/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src="https://tongthe365.com/assets/default/plugins/bootstrap-flatpickr/bootstrap-flatpickr.js"></script>
<script type="text/javascript" src="https://tongthe365.com/assets/default/plugins/bootstrap-flatpickr/bootstrap-flatpickr-vn.js"></script>
<script type="text/javascript" src="https://tongthe365.com/assets/default/plugins/select2/js/select2.min.js"></script>
<script type="text/javascript" src="https://tongthe365.com/assets/default/plugins/swiper/swiper-bundle.min.js"></script>
<script type="text/javascript" src="https://tongthe365.com/assets/default/js/app.js"></script>
<script type="text/javascript">
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$('body').on('click', '.softcard-btn', function (e) {
if (!$(this).hasClass('checked')) {
$('.softcard-btn').removeClass('checked');
$(this).addClass('checked');
} else {
}
});
$('body').on('click', '.sc-item-btn', function (e) {
ele = $(this);
itemSku = ele.data('sku');
itemId = ele.data('id');
row = '';
if (ele.hasClass('active')) {
ele.removeClass('active');
type = 'remove';
row = ele.data('row');
} else {
ele.addClass('active');
type = 'add';
}
$.ajax({
url: 'https://tongthe365.com/ajax/mua-the',
method: 'POST',
data: {type: type, id: itemId, row: row},
beforeSend: function () {
// $('.overlay').show();
},
success: function (data) {
data = $.parseJSON(data);
if (type == 'add') {
ele.data('row', data.row);
}
$('#shopping-cart-wrapper').html(data.shopping_cart);
// $('.overlay').fadeOut();
}
});
});
$('body').on('change', '.shopping-cart-qty', function (e) {
if (checkInputQty($(this))) {
rowId = $(this).data('row');
qty = $(this).val();
itemId = $(this).data('id');
$.ajax({
url: 'https://tongthe365.com/ajax/mua-the',
method: 'POST',
data: {type: 'update', row: rowId, qty: qty},
beforeSend: function () {
// $('.overlay').show();
},
success: function (data) {
data = $.parseJSON(data);
$('#shopping-cart-wrapper').html(data.shopping_cart);
// $('.overlay').fadeOut();
}
});
}
});
$('body').on('click', '.delete-cart', function (e) {
$.ajax({
url: 'https://tongthe365.com/ajax/mua-the',
method: 'POST',
data: {type: 'delete'},
beforeSend: function () {
// $('.overlay').show();
},
success: function (data) {
data = $.parseJSON(data);
$('.sc-item-btn').removeClass('active');
$('#shopping-cart-wrapper').html(data.shopping_cart);
// $('.overlay').fadeOut();
}
});
});
$('body').on('click', '.cell-delete-item', function (e) {
sku = $(this).data('sku');
row = $(this).data('row');
$.ajax({
url: 'https://tongthe365.com/ajax/mua-the',
method: 'POST',
data: {type: 'remove', row: row},
beforeSend: function () {
// $('.overlay').show();
},
success: function (data) {
data = $.parseJSON(data);
$('#item-' + sku).removeClass('active');
$('#shopping-cart-wrapper').html(data.shopping_cart);
// $('.overlay').fadeOut();
}
});
});
$('body').on('click', '.btn-number', function (e) {
e.preventDefault();
fieldName = $(this).attr('data-field');
type = $(this).attr('data-type');
var input = $("input[name='" + fieldName + "']");
var currentVal = parseInt(input.val());
if (!isNaN(currentVal)) {
if (type == 'minus') {
if (currentVal > input.attr('min')) {
input.val(currentVal - 1).change();
}
if (parseInt(input.val()) == input.attr('min')) {
$(this).addClass('disabled');
}
} else if (type == 'plus') {
if (currentVal < input.attr('max')) {
input.val(currentVal + 1).change();
}
if (parseInt(input.val()) == input.attr('max')) {
$(this).addClass('disabled');
}
}
} else {
input.val(0);
}
});
$('body').on('focusin', '.input-number', function () {
$(this).data('oldValue', $(this).val());
});
$('body').on('keydown', '.input-number', function (e) {
// Allow: backspace, delete, tab, escape, enter and .
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 190]) !== -1 ||
// Allow: Ctrl+A
(e.keyCode == 65 && e.ctrlKey === true) ||
// Allow: home, end, left, right
(e.keyCode >= 35 && e.keyCode <= 39)) {
// let it happen, don't do anything
return;
}
// Ensure that it is a number and stop the keypress
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
});
function checkInputQty(ele) {
// $('body').on('change','.input-number',function() {
// ele = $(this);
minValue = parseInt(ele.attr('min'));
maxValue = parseInt(ele.attr('max'));
valueCurrent = parseInt(ele.val());
namea = ele.attr('name');
if (valueCurrent >= minValue) {
$(".btn-number[data-type='minus'][data-field='" + namea + "']").removeClass('disabled')
} else {
alert('Sorry, the minimum value was reached');
ele.val(ele.data('oldValue'));
return false;
}
if (valueCurrent <= maxValue) {
$(".btn-number[data-type='plus'][data-field='" + namea + "']").removeClass('disabled')
} else {
alert('Sorry, the maximum value was reached');
ele.val(ele.data('oldValue'));
return false;
}
return true;
// });
}
</script>
</body></html>