Take a look at the following code:
this.forms = {
signIn: {
email: $('#tb-input-sign-in-email'),
password: $('#tb-input-sign-in-password')
},
signUp: {
fullName: $('#tb-input-sign-up-full-name'),
email: $('#tb-input-sign-up-email'),
password: $('#tb-input-sign-up-password')
}
};
This is my old code that initializes my textbox jQuery plugin:
$('#tb-sign-in-email, #tb-sign-in-password').textbox();
The new code (using the this.forms array) would be:
this.forms.signIn.email.textbox();
this.forms.signIn.password.textbox();
Basically I want to initialize the textbox plugin with one line of code just as the "old code" initializes the jQuery plugin (with a single selector).
#tb-sign-in-emailto#tb-input-sign-in-emailand this is why the "old code" selector isn't working anymore?