Questions tagged [dom]
The Document Object Model (DOM) is an application programming interface (API) for valid HTML and well-formed XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated.
403 questions
6
votes
1
answer
117
views
Code for smart CSS rounding using JavaScript
I wrote a project that allows you to make CSS corner rounding more consistent and, in my opinion, nicer. Here's full GIT repo with an example and a README.md: https:...
8
votes
2
answers
362
views
Library project - javascript
I am going through the Odin Project and have just finished the 'Library' project on their FullStack JavaScript course. As this is the first time I'll have my code reviewed, I want to know what I'm ...
4
votes
3
answers
279
views
Get the contents of a table cell for all selected rows
I have a table of user info. When you click the button, I want to get the email address from each selected row, output into a comma-separated string.
I got it to work with the following code, but I'm ...
0
votes
0
answers
97
views
DOM manipulating that I called Framework
I'm building a framework like this that can turn SASS-like code into CSS, a template engine like Mustache, a DOM manipulator like React, and a router to add a single page app, and I'm having a ...
0
votes
0
answers
81
views
Enable a textbox when the previous one is no longer empty
I've written this JavaScript code, which disables textboxes if the previous textbox is empty. This is so people enter the text in order — write first in the first textbox, only then the second textbox ...
2
votes
1
answer
844
views
jQuery code to add / remove classes depending on the button clicked
What the code does
What the JQuery code does is add / remove classes on div's elsewhere on the page, depending on the button clicked.
Button 1 clicked → add class ...
2
votes
1
answer
88
views
Wrting A Movie app , must be a better way
I am trying to get the value from the from and and pass it to the API and output the result to the DOM. The code works fine but I am 1000% sure there is a better way to write THIS. Thanks for the help ...
0
votes
1
answer
88
views
JS "Tabs" element
How can this be improved?
I'm looking particularly at the twice repeated tabButtons.forEach(button => {
...
4
votes
2
answers
1k
views
JavaScript front end for Odin Project book library database
I am currently working on The Odin Project and have reached the JavaScript Part. There is a project, to create a Website that serves a a library. You can add a book and it appears on the site as a ...
3
votes
1
answer
420
views
Unit test for a React click-counting component
Take this basic component using state:
...
2
votes
1
answer
86
views
Refactored Todolist created using TS
After getting the code review I refactored the code and the updated version is below.
I tried implementing the suggestions but because I am still learning I might refactor again after learning how to ...
2
votes
1
answer
1k
views
Animating GIF on hover in Javascript
I don't know JavaScript and it's safe to say this is my first code ever written in JS.
I just needed to animate my GIFs when user hovers over them only.
Googling separate concepts such as "string ...
2
votes
1
answer
196
views
Created a todo list in TS
I am learning Typescript and created a straightforward to-do list project to practice some basic concepts.
I am able to
Edit the todo
Delete the todo
Mark the todo as completed
I want to how can I ...
2
votes
2
answers
290
views
JavaScript code to check whether X won a tictactoe game
My code is already doing what I want, so it's functional, now my concern is, if there is a way to make it easier to read or even better and shorter my code, it's supposed to check if 3 'X' or 'O' are ...
0
votes
1
answer
393
views
Remove columns in HTML table where the sum is 0
I have an HTML table, and I would like to remove columns where the sum vertically is 0 dynamically.
...