label и input с flex-direction: column
; (что бы выстроились по вертикали)input type="text"
, а textarea
.first > * {
opacity: 0.5;
}
.first * {
opacity: 0.5;
}
.active .block {
border: 1px solid red;
color: red;
}
.active .under-box-text {
display: none;
}
.active .invisible {
display: block;
}
const itemSelector = '.wrapper';
const buttonSelector = '.block, .link';
const activeClass = 'active';
$(itemSelector).on('click', buttonSelector, e => {
$(e.delegateTarget).toggleClass(activeClass);
});
// или
document.querySelectorAll(itemSelector).forEach(function(n) {
n.querySelectorAll(buttonSelector).forEach(m => m.addEventListener('click', this));
}, e => e.currentTarget.closest(itemSelector).classList.toggle(activeClass));
// или
document.querySelectorAll(itemSelector).forEach(n => {
n.addEventListener('click', onClick);
});
function onClick(e) {
const button = e.target.closest(buttonSelector);
if (button) {
this.classList.toggle(activeClass);
}
}
// или
document.addEventListener('click', e => {
const button = e.target.closest(buttonSelector);
const item = button && button.closest(itemSelector);
item && item.classList.toggle(activeClass);
});
function Equipment() {
var Bag = [];
this.addTool = function(tool) {
Bag.push(tool);
console.log("Added. Bag:", Bag);
}
}
function Tools() {
this.item1 = {
name: "item1",
price: 5,
count: 10
};
this.item2 = {
name: "item2",
price: 15,
count: 20
};
this.item3 = {
name: "item3",
price: 20,
count: 30
};
this.item4 = {
name: "item4",
price: 30,
count: 40
};
this.item5 = {
name: "item5",
price: 40,
count: 50
};
}
var equipment = new Equipment();
var tools = new Tools();
equipment.addTool(tools.item1); //
IDIV 2
CMP AL,2
JGE M2
M1: MOV AL,ARRAY_X[SI]
TEST AL, 1
JZ M2
MOV ARRAY_Y[DI],AL
INC DI
M2: INC SI
LOOP M1
function getShapeParams() {
var shapeParams = {};
shapeParams = {
radius: document.getElementsByClassName('radius')[0].value.toString(),
x1Crd: document.getElementsByClassName('circle-x1-crd')[0].value.toString(),
x2Crd: document.getElementsByClassName('circle-y2-crd')[0].value.toString()
};
console.log(shapeParams.radius);
return shapeParams;
}
getShapeParams(shapeParams);
заменить на var shapeParams = getShapeParams();
и все должно работать.var shapeParams = {};
function getShapeParams() {
shapeParams = {
radius: document.getElementsByClassName('radius')[0].value.toString(),
x1Crd: document.getElementsByClassName('circle-x1-crd')[0].value.toString(),
x2Crd: document.getElementsByClassName('circle-y2-crd')[0].value.toString()
};
console.log(shapeParams.radius);
}
function circle() {
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
getShapeParams();
this.radius = shapeParams.radius;
this.x1Crd = shapeParams.x1Crd;
this.x2Crd = shapeParams.x2Crd;
context.clearRect(0, 0, canvas.width, canvas.height);
context.beginPath();
context.arc(x1Crd, x2Crd, radius, 0, Math.PI*2, false);
context.fillStyle = 'red';
context.fill();
context.lineWidth = 1;
context.strokeStyle = 'red';
context.stroke();
}
circle();
describe("selectChannel method", function () {
const tv = new TV();
tv.power();
it("does not allow selecting channel above 98", function () {
assert.isFalse(tv.selectChannel(100));
});
it("selects provided channel number if it matches requirements", function () {
tv.selectChannel(88)
assert.isEqual(tv._channel, 88);
});
});