Skip to content

Instantly share code, notes, and snippets.

app06

Block or report user

Report or block app06

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View js-tabs
// 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)
View js-only-int
//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();
View css-placeholder
*::-webkit-input-placeholder {
color: #666;
opacity: 1;
}
*:-moz-placeholder {
color: #666;
opacity: 1;
}
*::-moz-placeholder {
color: #666;
You can’t perform that action at this time.