Posts by Vitor Mendonça • 294 points
14 posts
-
1
votes1
answer27
viewsA: Responsive navbar does not appear when changing window size
I did it ! I searched a lot and saw that I could use resize ! Here the hiccup. window.onresize = function () { if (window.innerWidth > 480) { nav.style.display = 'grid';…
-
0
votes1
answer27
viewsQ: Responsive navbar does not appear when changing window size
I’m doing a full header with grid. The problem is I made a hamburger menu. So I made this function to click it appear and click again it hide. However if I enlarge the window(resize) after clicking…
-
3
votes1
answer59
viewsA: I need to auto-fill an input
Just add value="50" right into html. If you want it not to be editable just add a readonly. Or by js, like the previous comment. Example: <input type="text" class="nightlife_drug_quantity"…
-
2
votes2
answers197
viewsQ: Why window.innerheight/ window.innerWindow does not work with Document.getelementsbytagname('canvas');
Why doesn’t it work? const canvas = document.getElementsByTagName('canvas'); canvas.width = window.innerWidth; canvas.height = window.innerHeight And that’s what? const canvas =…
-
1
votes1
answer84
viewsQ: Return the value that is clicked from an array in a Function. I only know how to do using Event.target
I want to return the value that is clicked, from the array. I know how to do this only with add.Eventlistener. In the case e.target. <h2 onclick="menuclick()" class="notselectable…
-
3
votes1
answer220
viewsQ: Help with centering grid items
I cannot vertically center my grid items in the middle of the div #grid-container. The funny thing about Justify-items:center; works ! however align-items:center; Not =( #grid-container{ width: 50%;…
-
0
votes0
answers34
viewsQ: Prevent user to type numbers and symbols. However problem something use Capslock Buttons
When I click the input and hit Caps Lock, Backspace, it sends the patch message. for example, I type the normal and safe Backspace input to delete everything, when it comes at the end it shows the…
-
1
votes3
answers28
viewsQ: I can’t leave the ROW imgs with flexbox
I can’t put them in Row, only if they’re wide enough to be right next to each other. *{ box-sizing: border-box; } #countainerslider{ display: flex; flex-flow: row wrap; width: 100%; height: 560px; }…
-
0
votes1
answer64
viewsA: Help with Array and operations
I did it ! The solution for % was this: case "%": var arraylastnum = arrayhistory.slice(-1)[0]; console.log(arraylastnum); if (arraylastnum == 1) { resultado = (inputdisplay.value / arraylastnum); }…
-
1
votes1
answer64
viewsQ: Help with Array and operations
Array[1] previously set. The logic is to take the last array number, do the operation with the display value and return as the last array number. Example: Type 2 and press X, 2 * the last item of…
-
1
votes1
answer32
viewsQ: Receive the numeric keys to make some functions equal for all of them on the switch in a calculator
switch (e.target.value) { case "A/C": console.log('ae') break; case "C": break; case "X": break; case ".": break; case "%": break; case "-": break; case "√": break; case "+": break; case "÷": break;…
-
0
votes2
answers253
viewsA: Add item to an Array coming from an Htmlcollection
The best solution I could find is to use the Bubbling Event to my advantage. I’ve studied a little bit more. The way is to use the larger element as the . ul = document.QuerySelector('#div ul')…
javascriptanswered Vitor Mendonça 294 -
0
votes2
answers253
viewsQ: Add item to an Array coming from an Htmlcollection
insira o código aquiI have a HTMLCollection icon. I have the option to add a new text that comes with a new icon, in case increasing this HTMLCollection. need to make a ForEach() on it to give…
javascriptasked Vitor Mendonça 294 -
1
votes1
answer123
viewsQ: Difference between algorithms that read numbers until receiving the number 999
What is the difference of these codes? First code: cont = 0 n = 0 total = 0 n = int(input("Digite 999 para parar")) while n != 999: n = int(input("Digite 999 para parar")) cont += 1 total += n…