Jquery accordion
Jquery accordion
The code below creates and deletes the content of the accordion <div id="accordion">. With the initial accordion population everything works properly ie the proper content is generated and the "accordion action" works. But once the the <div id="accordion"> is emptied and re populated all the content is correct, but the "accordion action" does not work ie everything is expanded..
Please comment
- Kinetic.Layer.prototype.omniLoadPropertiesPallet = function(node){
- attrs= node.getAttrs();
- for (key in attrs) {
- if (attrs.hasOwnProperty(key)) {
- $("#accordion").append(
- "<h3 class=\"accordinH3\" >("+typeof attrs[key]+") "+key+"= "+attrs[key]+"</h3>"
- +"<div><p>"
- +" <input type=\"button\" class=\"down\" id=\""+key+":down:"+typeof attrs[key]+"\" value=\"▼\" />"
- +"<input type=\"button\" class=\"up\" id=\""+key+":up:"+typeof attrs[key]+"\" value=\"▲\" />"
- +"<td><input type=\"text\" class=\"omniProperty\" id=\""+ key +"\" size=20 value=\""+ attrs[key]+"\">"
- +"</p></div>"
- );
- }//END if (attrs.hasOwnProperty(key)
- }// End for (key in attrs)
- console.log("accordion call");
- $("#accordion").accordion();
- }// END Kinetic.Layer.prototype.omniLoadPropertiesPallet
- function omniUnloadPropertiesPallet(){
- $("#accordion").empty();
- }