0
Can you help me with the code? Change the color of the div element
So i have this array.And I need to change the color of div element every time it loops through settings array and also show color value in the div element.\ var settings=[ {clor:orange, backgroundColor:'#4CAF50',height:'30px',width:'30px'}, {eigth:'150px',color:white, ,width:'90px',backgroundColor:'#2196F3',} {idth:'2000px', height:'200px',color#fbff64, backgroundColor:'#f44336'}, {backgundColor:'196F3'width:'500px',color:heigtt:'320px',color:'black'},]
6 Answers
+ 6
can you post a link to your code here?
+ 6
You missed many things on both the html, css and javascript
...if it doesn't work on your browser, try the jQuery method!
https://code.sololearn.com/WkV4r1tZm9A6/?ref=app
0
Yes sure.I'll elaborate a bit and post it
0
Heres is my code.I need to get the color attribute of array element,in this case div element.And when I loop through the array I need to print the color name in div section and with each i++ element printing change the div style on onclick event.I know my description is weird and complicated đ
0
I know that my code is incomplete.I just wrote basic code to give you idea about the task.The main issue with the code is that I couldnt get nodes with the method I used in the code,mainly when I console logged document.getElementByID.childnodes it had a right output.but when i tried to print value or alter smth it printed like value of null. I want to understand where this null come from.