jquery.AreYouSure icon indicating copy to clipboard operation
jquery.AreYouSure copied to clipboard

Better performance getValue for select

Open hasangursoy opened this issue 7 years ago • 3 comments

hasangursoy avatar Feb 12 '18 11:02 hasangursoy

It looks like that case is needed for compatibility with multi-selects. I agree it needs to be optimized though. Perhaps this instead? Note - untested, just off the top of my head.

$field.find('option:selected').each(function() {
    val += $(this).val();
});

myahlGDCI avatar Mar 15 '18 16:03 myahlGDCI

val = $field.val(); will be enough for multiselects

hasangursoy avatar Mar 15 '18 17:03 hasangursoy

Alright, thanks. :)

myahlGDCI avatar Mar 15 '18 17:03 myahlGDCI