2
4

1 に答える 1

3

ビュー内に関数を作成する必要があります。

    events: {
        "click #expense-delete-button": "deleteRow",
        "click #expense-copy-button": "copyRow",
    },

    deleteRow:function(e){
        e.preventDefault();
        //Element clicked on
        var target =  $(e.currentTarget);
        console.log('whatever you want');
    },

    copyRow:function(e){
        //Element clicked on
        var target =  $(e.currentTarget);

        console.log('copy your row');
    },

    initialize:function(){
        //view code....
    }
于 2012-12-01T15:08:17.557 に答える