On Jul 22, 2:16 am, barophobia <[EMAIL PROTECTED]> wrote:
> I think I understand but how do I handle the #passwordField part
> within the plugin?

In your plugin implementation, simply store a reference to the
#passwordField passed to your plugin. For example, if you plugin looks
like this:

jQuery.fn.myPlugin = function(targetField) {
  var self = this;
  self.textfield = jQuery(targetField);
  ... do whatever you normally do ...
  ... updates of the text field are applied to self.textfield ...
  ... you can use self.textfield in inner functions, e.g. those
defined as click() handlers ...
}

Now you can call:

$('#button').myPlugin('#IDForSomeTextField');



Reply via email to