Small change to avoid over-specifying the related field selector... #22

Closed
wants to merge 1 commit into
from

3 participants

@i-like-robots

... Overcompensating for such a user error is not worth the performance hit (in my experience).

I have setup a basic JSPerf test to demonstrate the difference http://jsperf.com/over-qualified-selector-performance

@i-like-robots i-like-robots Small change to avoid over-specifying the related field selector. Ove…
…rcompensating for such a user error is not worth the performance hit (in my experience).
92326bd
@ljharb

Seems like you can cover the same use case by changing line 134 to $field = $("#" + for_attr + ':input'); or `$field = $("#" + for_attr).filter(':input');

@frequent

@i-like-robots

I just tried your commit and it produces an error on iPad. I assume this.for and this.htmlFor are not supported, because once I revert to the original attr('for') it's working again.

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