Thank you for explaining, it helps alot.. what is the syntax if i want to appendChild to the h3 instead of just section. The icon/button needs to be a child of the h3 so i can put them on the same line.
I know they were on the same line to begin with but i added a div because i need them to be listed vertically in its own scroll box, and the button on the same line..
i got alittle of it by adding h3 to the selectorAll but i dont know the syntax for the rest of it to use the h3, i add h3 but it says h3 is not defined..
What im looking for is that i want the Title and the mouse icon seperate from the rest inside the garage, so i added a div inside garage called parked_items and it has a scroll bar.
here is where i added the h3
for (var section of d.querySelectorAll("#lot > section h3, #parked_items > section h3")) {
var button = section.appendChild(d.createElement("button"));
i am also assuming that this is ternary in js
(section.parentNode.id == "lot" ? garage : lot).appendChild(section);
the issue now is that it looks great in the parking garage but when i toggle back to lot it gets separated from the section and they all end up down below the sections, so basically the lot boxes have no h3 to them, just the text. I did test the togglePark function with console.log and its corrrect, it shows section as h3
Maybe rather than explain (since i have a hard time doing that) ill just show you the end result...
Here is what i am trying to do.. Here is a video i made before i changed things, thats exactly what im looking for in the parking and the drag n drop... although i admit my drag n drop i think has a bug in it as you can see by the video, that box didnt fit so well when i dropped it into an strange place.
I think the best thing for me to do is to get the parking done first, then ill work on fixing my drag n drop issue. I think the drag n drop might mean i have to add a "Event.preventDefault" but im not sure yet until i put it together. Actually what happened in the video there is that there are two sep divs, one upper for the large item and one lower for the other smaller boxes, i tried to drop it in the large div, and it is not a bug, it did what it should have done, stuck to the top of its own div... So maybe ill make it so the large div cant be resized.. not sure yet...
Also its only asthetics that it seems in the video that im having to click on the mouse icon, i could actually click anywhere on the box to drag it , i dont know why i kept holding the mouse icon lol
So i guess the first thing is how do i get this to the h3 element, i think thats what i need.
Too bad you dont have a video bbcode, here is the link.
https://www.youtube.com/channel/UCyxILQ_HoQOPUDC9kPGqi9Q?guided_help_flow=3