Accordion on Dom elements

Accordion on Dom elements

Hi,
I am using jquery on google map api. But I stuck somewhere.

I have a leftbar which have title and description of a product. I want to apply accordion on that bar. The problem is that the title and description are coming from database on php call and then i am embedding them in runtime generated div. I want to show title only at page load and clicking on title the description will be shown. But i am not able to do that.
I tried the slide up and slide down on class, but not able to access the class. I am pasting somw code here:

var div = document.createElement('div');
div.id='sidebarEntry'+id;


var html = '<span class=\"dealname\">' + name + '</span>' + '<br>'+'<p class=\"dealdesc\">'+description+'</p>';
div.innerHTML = html;
div.style.cursor = 'pointer';
div.style.marginBottom = '5px';

Can anybody solve my problem. Its very urgent.

Thanks in advance
Benipal