jquery ui - Append the global function in active accordion panel -


$("#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"  }] }); 

i want know append function item(ui) active panel when clicked button(where button in dialog id btn) mean dialog open when class .normal_add_box clicked , when click submit function item(ui) must used , append data active accordion panel dialog opened.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -