changed existing selected_values check to use value instead of value/label #59

wants to merge 1 commit into


None yet
1 participant

I don't see a reason to use the label instead of the value:

selected_values.push($(this).val() + "-" + $(this).text());

Why not just use:


I was having trouble with returned JSON and encoded HTML entities not matching the label that was pulled from the page using .text() - sure it is possible to also use .html() but why not forget about the labels and check for duplicates / existing based on the selected value and not the label? the part of the code that was changed is not used when displaying the dropdown, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment