我有以下代码。具有类“.acc_container”的HTML元素是通过AJAX调用动态创建的,因此当执行代码“$('.acc_container').hide();”时,它们还不存在。在这里是否有类似于事件绑定的“live”函数的解决方法?
$(document).ready(function () {
$('.acc_container').hide();
$.ajax({
type: 'GET',
url: 'Sample.xml',
dataType: 'xml',
success: function (xml) {
//Tags with ".acc_container" class created here