How to create a div with jQuery accordion
- by skdnewbie
Im using this:
<script>
$(function() {
$( "#accordion" ).accordion();
});
</script>
To get the effect of expand/collapse. (If you know a better plugin or method, pls notice me)
I have this div: <div id ="accordion"></div>
And this code to create a button inside that div. (dont worry about the content of button)
$('#button_submit').click(function()
{
$("#accordion").append(
$("<button id=saved"+j+">").click(function() {
drawChart.apply(null, myArray);
}).html("<b>Start date:</b>"+""+myArray[0]+"\n<b>End date:</b>"+myArray[1]+"\n<b>Chart type:</b>"+myArray[2]+"")
);
My question is, how to create/format div accordion to have this effect accordion effect jquery .
being that the <button id=saved"+j+"> should appear inside the sections.
Cheers