add "dd2" and a trigger element as below, to containing div... hidden element gets a class of details.
Must call "dropDown2();" to initiate Use the following to have some items initiate in open position. if (scrnVrs == 'full') { $('.dd2 header').removeClass('open'); $('.dd2 header').each(function(i) { if ( i < 1 ) { $(this).addClass('open'); } }); } ----------------------------------------------------------------- When used in edit areas add below to "editorCustomCode.js" : /*---------------------------------------------------------------------- CUSTOM EVENTS ON BLUR ------------------------------------------------------------------------*/ function onBlurAddOn(){ if (parent.pageID == 'homepage' && parent.currentEditArea == '#edit51'){ /* for dropdowns: */ $("#edit51 .details").css("display","none"); /*$(".editwrap .open").next(".details").css("display","block"); */ $('#edit51 header').each(function(i) { if ( i < 1 ) { $(this).next(".details").css("display","block"); } }); } } /*---------------------------------------------------------------------- CUSTOM CLEANING on PUBLISH ------------------------------------------------------------------------*/ function customCleanOnExport(newContent) { /*alert (newContent); */ var parseContent = newContent; /* START PARSE - create jquery object */ var jqParse = '
' + parseContent + '
'; jqParse = $(jqParse); /* /////////////////////////////////////////////////// */ /* MANIPULATE */ /*alert(jqParse.html());*/ $("#edit51 header",jqParse).removeClass("open"); $("#edit51 header",jqParse).removeClass("divdropdown2"); $("#edit51 .details",jqParse).removeAttr("style"); /*alert(jqParse.html());*/ /* /////////////////////////////////////////////////// */ /* END PARSE */ $("#jqParse",jqParse).contents().unwrap(); /* RELOAD CONTENT */ var parseContent = jqParse.html(); parseContent = fixJqueryParcing(parseContent); newContent = parseContent; /*alert (newContent);*/ return newContent; }