R
R
Roman Petrushov2018-03-29 14:29:37
JavaScript
Roman Petrushov, 2018-03-29 14:29:37

How to implement saving values ​​when selecting Submenu in dropdown&? And take them out?

You can also do https://www.bootply.com/62811 , only that there is also a submenu and the values ​​\u200b\u200bare set depending on the choice. That is, if I selected only Item - 1, then this value should be set in the field, if I selected sub-item-1, then the value item-1, sub-item-1 was set in the field.
If anyone knows please help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2018-03-29
@KickeRockK

And select does not suit you?
And anticipating you the issue of option nesting read here .
and is the value of the selected option, i.e. handlers do not need to be written, just pick it up .val(); $('select').val()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question