I am trying to get the value of the check box to display on we page <div class="form-check form-check-inline"> <input class="form-check-input skill" type="checkbox" id="inlineCheckbox1" value="JAVA"> <label class="form-check-label" for="inlineCheckbox1">JAVA</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input skill" type="checkbox" id="inlineCheckbox2" value="HTML"> <label class="form-check-label" for="inlineCheckbox2">HTML</label> </div> <div class="form-check form-check-inline"> <input class="form-check-input skill" type="checkbox" id="inlineCheckbox3" value="CSS" > <label class="form-check-label" for="inlineCheckbox3">CSS</label> ..
Category : dom
I’m trying to enchance the layour of my navigation menu bar. Want I would want to acomplish is having a class style "active" for the item in the menu that is active, that means we clicked on it. The style for class "active" only highlights in blue the item in the navbar (the others "inactive" ..
I’m making a todolist right now and encountered a problem when deleting a list. // nest icon inside button tag delBtn.innerHTML = ‘<i class="fas fa-times fa-lg"></i>’; I have nested an icon inside a button tag so when I’m clicking the delete button on the very edge it deletes the ul tag. And when clicking inside ..
I want to take any camelcase property on CSSStyleDeclaration and get the corresponding kebabcase CSS property. E.g. converting marginLeft to margin-left. Is there a built-in function that does this? I don’t want to simply convert camelcase into kebabcase because there’s no guarantee that it’ll always work. Source: Ask Javascript..
I’m building a todo list right now and wondering about the usage of innerHTML. If I want an icon inside of a button tag: btn.innerHTML = ‘<i class="fas fa-times fa-lg"></i>’; which is <button><i class="fas fa-times fa-lg"></i></button> am I right? What is the difference between the above and below? btn.innerHTML += ‘<i class="fas fa-times fa-lg"></i>’; Source: ..
Help! I am working on an application which downloads a report from an API which gives me HTML as part of the JSON return. Because it returns JSON I cannot simply open this in a new window. In this script I am injecting this code: let tmp = result.data; let spot = tmp.indexOf(‘</body>’); let insert ..
I am making an HTML/JS document, and I’ll need a way to take a picture of the screen every frame and store it in an array, so that it’s basically like a screen recording. But I’m having trouble knowing how to do this. What I was thinking was something like this: var pictures = []; ..
I have an array with 8 objects. I am using a loop to get the values of each items. And I want to display them in a div in my html file. I’d like to display only 4 of them (for the moment! but after I want to replace those images automatically when I delete ..
As we know we can assign a function/method to another variable and execute it anytime with the assigned variable. const logger = { log: (text) => { console.log(text); }, }; const log = logger.log; logger.log(“Log test”); log(“Log test 2”); But why we can’t assign document.querySelector to a variable and use it. querySelector is also a ..
this previous project that I’ve taken over came up weird because it uses vanillajs on a vue project. SCENARIO: It has a popup dialog which happens to work by vanilla js. WHAT IS ACTUALLY HAPPENING TO THE POPUP DIALOG There’s a div with a class name of popup-picture which has a default style binding of ..
Recent Comments