Skip to content
Advertisement

jQuery bind click event to button on each option of select element

I’m trying to make a click event on submit button on each option element of select.

Here is my script:

JavaScript

But, it just work on the last option element.

Advertisement

Answer

But, it just work on the last option element.

I don’t know what you are trying to achieve, but your code should work.

Also not sure about the usage of selectObj.val($(this).val());

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement