在 Ajax 加载后,没有点击功能与 jquery 和引导 / Photogallery


After Ajax load no click function with jquery and bootstrap / Photogallery

坦克你!

我有一个新问题 ajax 加载这个 (ajax.php):

<div class="wall-img-preview lightbox clearfix">
<div class="wip-item" data-src="media/gallery/2.jpg" style="background-image: url(media/gallery/2.jpg);" data-sub-html="<em><h3>This is a caption heading</h3><p>Here goes the description...</p></em>">
<img src="media/gallery/thumbs/2.jpg">
</div>
</div>

但是没有点击功能(带有jquery,bootstrap等滑动功能的Photogallery)这是我的ajax脚本:

$.ajax({ type: "POST", url: 'appajax.php', data: parameter, 
    success: function(data) 
        {
        // $('#'+id).html(data);
        $('#'+id).html(data).row("refresh");
        }
    });

我尝试使用跳跳虎并刷新,但 NU 成功:(请帮忙,谢谢!

请纠正您的英语。

据我了解,您的问题是加载后页面ajax挂起。请尝试用以下代码替换代码

$.ajax({ type: "POST", url: 'appajax.php', async:false, data: parameter, 
success: function(data) 
    {
    // $('#'+id).html(data);
    $('#'+id).html(data).row("refresh");
    }
});

async功能将防止DOM挂起。