drastik/civicrm_stripe — pull request #53 by Swingline0 (2014-09-24 21:15:42+00:00)
Title: Cache instantiated jQuery Form object when using multiple times

Just a slight performance increase here. Instead of using `$(this)` every time the form is accessed (a process that requires parsing the DOM each time), the instantiated jQuery object is stored in `$form` for frequent use.

This is even how Stripe's [example form](https://gist.github.com/briancollins/6365455) is coded.

Reviewing my PR, I just noticed that I subconsciously switched `$.attr` to `$.prop`. It works as is but I'm happy to revise this if it's a disagreeable change.