I am having a Jquery Accordian , which creates nested Accordians based on the search result .
This is my jsfiddle
http://jsfiddle.net/DBYLk/25/
Initial
Firstly, you are appending many divs with the same However you can store the entire "path" via jQuery's Also the Handling the data thereafter is a matter of manipulating the Demo:http://jsfiddle.net/robschmuecker/DBYLk/33/id
which is wrong. data
attribute and replace the basePath
with nothing e.g.var tempName = response[i].replace(selectedeleemnt + "***", "");
html+="";
PopCorn
in your JSON needs to be uniform as currently you have PopCorn
and then Popcorn***
selectedeleemnt
by doing a check if it hasData
and then using that instead of the headerText
.