I’m stuck I want to make so when I click on “vad åt jag” a dropdown box comes up and you can choose from a list of item I don’t want it to be below like it’s now. I want it to be a part of the future. Been stuck for awhile now.
Ok did it thanks for the tip.
Ok so i want it so when i click on “vad åt jag” the dropdown box comes up and you can choose from options ill add in later on.
Right now you can see in “Måltid 1” under “vad åt jag” there is a box with “grönsaker” i want the box with grönsaker to disappear from below “Vad åt jag”.
Then i want the box with “grönsaker” to come up when i click on the box vad åt jag.
If i am getting it right you are trying to achieve something like in this forked pen
Ye but i want it to be a replacement for “vad åt jag” like when i click on "vad åt jag "the dropdownbox pops up directly.
And i have never seen that sort of javascript. What is it? How can i learn it?
That is jQuery, a very common library of JavaScript. It is one of the things taught on free code camp.
try reloading my pen above and let me know if that’s what you looking for
You got it right. Is their no chance i can do something like that on css ,html,javascript? Been programming for 2 weeks i know html basic css and some javascript. trying to learn by doing websites right now because i noticed after 2 weeks i couldn’t even do a basic to make a website.
as @kevinSmith explained jquery IS just a javascript library that makes things much easier to write. ofc you can write all the code i’ve written in js part in plain vanilla javascript if that’s what you want.
Okey thank you for the eye opener. Is there any tips to know if i need javascript for me it seemed like a html css thing. Also how can i search for stuff like this on google when i don’t know how to explain things with a few words? Or know what it’s called?
asking the right question on google will give you the most appropriate response in the first place.
So, lets say you want to know what jquery function to use to hide an element, then “jquery hide element” will show you the right answer.
The best way to get the right answer when googling is to put the shortest and concise question using keywords from your broader question.
Gotcha thanks for the eye-opener.
You are very welcome.