Bug Tracker

Show
Ignore:
Timestamp:
12/28/07 16:40:03 (1 year ago)
Author:
joern.zaefferer
Message:

fixed dynamic inputs demo; started incorporting delegate plugin

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/validate/test/events.html

    r4324 r4329  
    1212<script type="text/javascript"> 
    1313$().ready(function() { 
    14     $("#commentForm").delegate("focusin", ":text, textarea", function() { 
     14    var handler = { 
     15        focusin: function() { 
     16            $(this).addClass("focus"); 
     17        }, 
     18        focusout: function() { 
     19            $(this).removeClass("focus"); 
     20        } 
     21    } 
     22    $("#commentForm").delegate("focusin focusout", ":text, textarea", function(event) { 
     23        /* 
    1524        this.addClass("focus").one("blur", function() { 
    1625            $(this).removeClass("focus"); 
    1726        }); 
     27        */ 
     28        handler[event.type].call(this, arguments); 
    1829    }); 
    1930    $("#remove").click(function() {