Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Tagged: id, select option
Hi guys, i am planning to create a function that decreases a number when someone chooses a course within my website and submits the form, i have used the built-in form. I am wondering if i can give each select option an id, so i can target that, or if you know of a better solution i will gladly hear about that.
Hey mostafa0401,
The select option gets assigned an ID by default, the individual option elements does not however. You might be able to use the select ID, in combination with nth-child, in order to target the options. Or you might be able to inject IDs to the options using JavaScript.
Best regards,
Rikard