jQuery .on() method doesn't see new elements

前端 未结 3 1993
遥遥无期
遥遥无期 2020-12-03 00:50

I\'m getting a JSON element and building a list from its items like this:

getTitles: function(data) {
    data = data || {};
    var list = [];

    $.getJSO         


        
3条回答
  •  离开以前
    2020-12-03 01:06

    You can use the arrive.js library (it uses MutationObserver internally).

    document.arrive('a', function(){
        // 'this' refers to the newly created element
        var newElem = this;
    });
    

提交回复
热议问题