I have a custom event, which rising when new Item created:
Event definition
 $.fn.extend({
        OnListItemCreated: function (callback) { $(this).bind('OnListItemCreated', c开发者_如何学Pythonallback);  }
});
When item created, call this:
dialogListFiled.trigger("OnListItemCreated", newItem);
  .... need to using UPDATED newItem....
Event handling:
myObject.OnListItemCreated(function (newItem) {
            newItem.CountryId=...
                    ...update some newItem values....
        });
How best way to handle newItem and update it?
Actually i had same problem of yours, i needed to handle new elements creation, i used Jquery.liveQuery Plugin, original live() method cannot monitor creation of elements
Sample: (You can do this simply by adding a class to your elements which you want to monitor)
$("[class='mylist']").livequery(function(){ 
    this.CountryId = 1; // handle your element
}); 
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论