0

我有最新的 Fancybox,我只想用 Fancybox 中的按钮更新 Ajax Fancybox 的内容。Fancybox 中是否有任何方法可以重新加载内容?

4

1 回答 1

0
$('#button').click(function(){
$.ajax({
                data:
                    {
                        //whatever you need to send back to the server
                        //this could be the id of the element to refresh


                    },
                url: 'your_url_to_send_it_to'
                cache: false,
                type: 'POST',
                success: function (result) {
                    //update the element with result
                }
            })


});

我已经写了一个非常简单的 ajax 调用,它是一个 id 为“button”的按钮。这正是您刷新 Fancybox 元素所需要的。您无法在 Fancybox 中使用任何方法来执行此操作,您必须编写自己的 ajax 调用。希望我能有所帮助。

于 2013-05-29T16:16:42.993 回答