Thanks.

It gives me an error saying "element.attr is not a function"

What is wrong with this:

highlight: function(element, errorClass) {
     if (element.attr("name") == "aupairLanguageList")
        $("#multiSelect-aupairLanguageList-title").addClass("error");
  },
  unhighlight: function(element, errorClass) {
     if (element.attr("name") == "aupairLanguageList")
        $("#multiSelect-aupairLanguageList-title").removeClass
("error");
  }

On Mar 26, 12:03 pm, Jörn Zaefferer <joern.zaeffe...@googlemail.com>
wrote:
> Use the highlight and unhighlight options for that.
>
> Jörn
>
> On Thu, Mar 26, 2009 at 3:21 PM, markstegg...@googlemail.com
>
> <markstegg...@googlemail.com> wrote:
>
> > Hello,
>
> > Thanks for building this validation plugin, I like it. I have a
> > question:
>
> > The error class automatically gets added to the label with the same
> > for="" name, but for a certain error I need to change the element that
> > gains the "error" class.
>
> > For instance, I added this line to the error placement so that a
> > certain element receives the error class but then realised the error
> > class would not be removed when the error is corrected by the user:
>
> > <code>
> > else if (element.attr("name") == "aupairLanguageList") {
> >         error.insertAfter("#multiSelect-aupairLanguageList-content");
> >         $("#multiSelect-aupairLanguageList-title").addClass("error");
> >         }
> > </code>
>
> > Any Ideas?
>
> > Thanks

Reply via email to