$("#accordion").accordion({
icons: icons,
collapsible: true,
heightStyle: "content",
active: false,
header: "> div > h3",
activate: function (event, ui) {
setTimeout(function(){
item(ui);
},100);
}
}).sortable({
axis: "y",
handle: "h3",
stop: function (event, ui) {
ui.item.children("h3").triggerHandler("focusout");
$(this).accordion("refresh");
}
});
function item(ui){
var active = $('#accordion').accordion( "option", "active" );
var activeid = $('.ui-accordion-header-active').attr('id');
ithtml = '';
$.post('sample.php',function(data){
$.each(data, function( index, value){
var dividit = value.ItemID;
var cls = (value.IsVeg==0) ? 'green' : 'red';
var bord = (value.IsVeg==0) ? 'green_border' : 'red_border';
ithtml += 'some html content';
$(ui.newPanel).find(".normal_add__box").remove().end().append(ithtml);
},'json');
}
$('#dialog').dialog({
autoOpen: false,
buttons: [{
text: "Submit",
type:"submit",
id:"Btn"
}]
});
我想知道当我点击一个按钮(按钮处于id Btn 的对话框中)时,将功能项目(ui)附加到活动面板的位置,我的意思是对话框将打开当单击.normal_add_box类时,当我单击提交时,必须使用函数项(ui)并将数据附加到打开对话框的活动折叠面板。