Skip to content

Instantly share code, notes, and snippets.

*::-webkit-input-placeholder {
color: #666;
opacity: 1;
}
*:-moz-placeholder {
color: #666;
opacity: 1;
}
*::-moz-placeholder {
color: #666;
@app06
app06 / js-only-int
Last active February 15, 2018 14:16
//only integer input
function onlyInt(e) {
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
(e.keyCode === 65 && (e.ctrlKey === true || e.metaKey === true)) ||
(e.keyCode >= 35 && e.keyCode <= 40)) {
return;
}
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
// tabs
$('.controls').on('click', '.controls__link', function(e) {
e.preventDefault();
var
item = $(this).closest('.controls__item'),
content = $('.content__item'),
itemIdx = item.index();
content.eq(itemIdx)
@app06
app06 / gold per kg
Last active September 23, 2020 11:23
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<a href="javascript:(async () => {
async function getData(url, selector) {