DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Dom Created - Cant Attach Event

03.25.2007
| 6209 views |
  • submit to reddit
        // description of your code here


function yearAdd(){
    $.log("add");
}


dayDel = function dayDel(t){
    $.log(this);
    $.log(t.target);
    $.log('del');
}


$(document).ready(function(){
    var b = $("<b class='del'>x</b>").click(dayDel);
    $("div.day").append(b);
//   b = $("<b class='add'>+</b>").click(yearAdd)
//    $("div.year center").append(b);
});