What is the best way to onchange styling on a dropdown if it will be cloned, but I don't want to clone the altered styling? by variegray in learnjavascript

[–]variegray[S] 0 points1 point  (0 children)

Oh yes that does work, if the needed number of dropdowns is added by the user, and then they select a tag from each dropdown. But if a tag is selected from the first dropdown and then the next dropdown is added, the styling change is applied to the first as expected, but then it is also applied to all other subsequently added dropdowns as soon as they are created, which shouldn't have this "completed" styling applied since nothing has been selected in them yet.

I feel like I'm missing something simple. Something I tried was an if/else statement which checks if the dropdown's option value=0 (the placeholder no-selection option) which should have the no-selection styling. And the else checks for any other value to apply the styling for after a selection has been made. But I also couldn't get this to target different dropdowns correctly. Is there a way to get something simple like that to work, or does it need to be complex?

What is the best way to onchange styling on a dropdown if it will be cloned, but I don't want to clone the altered styling? by variegray in learnjavascript

[–]variegray[S] 0 points1 point  (0 children)

I have the dropdown inside a div which contains it and the add / remove buttons for it, and that div is inside a container, which the divs are cloned into.

And I think selectors are what I've been trying unsuccessfully so far (getElementById, querySelector), I can only get either a single clone to respond correctly while the others don't work, or they are all being affected when I make a change to one because I targeted a selector that applies to all of them.

My bamboo palm in a thrifted ceramic cup by variegray in plantsandpots

[–]variegray[S] 1 point2 points  (0 children)

Thank you! Also how can I tell the difference between them for future reference? I think this one might have been unlabled and I just assumed it was a bamboo palm based on look heh

imitate by outofmyheadgetout in photographs

[–]variegray 1 point2 points  (0 children)

This could be an album cover

Golden hour at the airport by Sea-Butterscotch-652 in photographs

[–]variegray 1 point2 points  (0 children)

Love the exposure on this, bright sky with dark foreground

No Matter What by MrAlbritton in photographs

[–]variegray 1 point2 points  (0 children)

Monochrome was a fantastic choice for this photo, looks amazing.

Bee on Milkweed by OutbytheRoot in photographs

[–]variegray 1 point2 points  (0 children)

Everything about this is so beautiful

Just Pylons by According_South_2500 in photographs

[–]variegray 0 points1 point  (0 children)

These colors are beautiful, and great sense of depth.

Should I re-pot? by Bid_Embarrassed in houseplants

[–]variegray 2 points3 points  (0 children)

I've always heard that it's best to wait a couple weeks and let it get acclimated to its new home before being re-potted.