Bug Tracker

Changes between Initial Version and Version 1 of Ticket #4101


Ignore:
Timestamp:
Feb 9, 2009, 5:46:47 PM (13 years ago)
Author:
joern
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4101 – Description

    initial v1  
    2626
    2727Probably a rather naiive implementation, but it would ensure that both each of the selected elements and each of the arguments are considered.
     28
     29The immediate usecase for me is to implement a subform-feature for the validation plugin. When an event like keyup or blur is triggered, I need to check if that target-element is contained inside the active subform-element, if so, validate it, if not, ignore the event. If it isn't inside any subform element, validate it, too. Something like this:
     30
     31{{{
     32var validator = ...;
     33$("form").keyup(function(event) {
     34  if (validator.subforms.contains(event.target) && validator.subforms.filter(":active").contains(event.target) {
     35    $(event.target).valid();
     36  }
     37});
     38}}}