[英]jQuery UI accordion open after loading jQuery Ajax
I'm using jQuery UI accordion for the first time and I have a question: How I can delay the opening after all Ajax data is loaded? 我是第一次使用jQuery UI手风琴,但有一个问题:在加载所有Ajax数据后如何延迟打开?
Here is the accordion code: 这是手风琴代码:
var ac = $("#accordion").accordion(
{
active: false,
event: false,
autoHeight: false,
navigation: false
},
{ header: "table" }
);
I know I can start open animation in this function: 我知道我可以在此功能中开始打开动画:
$(".SearchResults").load(
url,
{ input: id },
function () {
hideProgress();
}
);
After hideProgress it will run. hideProgress之后,它将运行。 How I can start opening?
我如何开始营业?
Try moving the accordion initialisation to the callback, after hideProgress()
, like this: 尝试将手风琴初始化移动到
hideProgress()
之后的回调中,如下所示:
$(".SearchResults").load(
url,
{ input: id },
function () {
hideProgress();
var ac = $("#accordion").accordion(
{
active: false,
event: false,
autoHeight: false,
navigation: false
},
{ header: "table" }
);
}
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.