JQuery UI禁用单个手风琴标头 [英] JQuery UI disable single accordion headers
本文介绍了JQuery UI禁用单个手风琴标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在JQ UI 1.8中禁用JQuery UI手风琴标题,所以我无法打开它们?例如,我有第1步到第4步。如果我保存了第1步,我只能打开第2步。
$( function (){
var icons = {
header: h3,
activeHeader: ui-icon-circle-arrow -s
};
$( #prod_accordion)。accordion({
active:<?php echo $ db_obj-> getValue(' status')?' acc _'。$ tab_status:< span class =code-string>' acc_0';?> ;,
图标:图标,
autoHeight:< span class =code-keyword> false ,
更改: function (event,ui){
var newIndex = $(ui.newHeader).index(< span class =code-string>' h3');
if (jQuery.inArray(newIndex,accordion_array)== -1){
var oldIndex = $(ui.oldHeader).index(' h3');
$( this )。accordion(' 激活',oldIndex);
}
}
});
});
解决方案
( function (){
var icons = {
header: h3,
activeHeader: ui-icon-circle-arrow-s
};
( #prod_accordion)。accordion({
active:<?php echo
db_obj-> getValue(' status')?' acc _'。
Hi,
Is it possible to disable JQuery UI accordion headers in JQ UI 1.8 , so i cant open them? For example i have step 1 till step 4. And i can only open step 2 if i saved step 1.
$(function() {
var icons = {
header: "h3",
activeHeader: "ui-icon-circle-arrow-s"
};
$( "#prod_accordion" ).accordion({
active:<?php echo $db_obj->getValue('status') ? 'acc_'.$tab_status : 'acc_0'; ?>,
icons: icons,
autoHeight: false,
change: function(event, ui) {
var newIndex = $(ui.newHeader).index('h3');
if (jQuery.inArray(newIndex , accordion_array) == -1) {
var oldIndex = $(ui.oldHeader).index('h3');
$(this).accordion('activate' , oldIndex);
}
}
});
});
解决方案
(function() { var icons = { header: "h3", activeHeader: "ui-icon-circle-arrow-s" };
( "#prod_accordion" ).accordion({ active:<?php echo
db_obj->getValue('status') ? 'acc_'.
这篇关于JQuery UI禁用单个手风琴标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文