I wanted to do something like:
$('#accordion').accordion();
$('#accordion').append('<h3><a href="#">New header</a></h3><div>New content</div>');
$('#accordion').accordion();
But it doesnt make the new content accordion-ated. Any advice on how to achieve this?
Thanks.
PS. In case you're wondering why I'd want to do this, I'm trying to create a 200 item accordion but want to lazy load the items when user scrolls to bottom of page.