私は動的にAJAX呼び出しを経由して、HTML生成パッシングAMで標的にすることができない、動的に追加されたコンテンツは、jQueryの
をたまたま今var loadContent = function(){
$.ajax({
url: '/url',
method: 'GET'
}).success(function (html) {
$('.content-wrapper').replaceWith(html);
})
//this is how simple returned html looks like
//<div class="content-wrapper"><ul"><li>test</li></ul></div>
};
の下に簡単な例を参照してください
var testAjaxGeneratedHtml = function() {
loadContent();
$('.content-wrapper ul li').addClass('test');
}