Hi, i modified the Horizontal Accordeon (http://www.dynamicdrive.com/dynamici...haccordion.htm) a bit (disabled mouseover and added ability to contract items after expanding them):
(only the blue line was put on a different place, everything else is original exept of the mouseover-effects being disabled)
Problem is, that after expanding and contracting one item, it cant be expanded again (only if you expand another item before). Guess its because config.$lastexpanded and $targetli are pointing to the same item and the effects are revoking each other. How to check that with javascript?Code:expandli:function(accordionid, targetli){ var config=haccordion.accordioninfo[accordionid] var $targetli=(typeof targetli=="number")? config.$targetlis.eq(targetli) : (typeof targetli=="string")? jQuery('#'+targetli) : jQuery(targetli) $targetli.stop().animate({width:$targetli.data('hpaneloffsetw')}, config.speed) //expand current content if (typeof config.$lastexpanded!="undefined") //targetli may be an index, ID string, or DOM reference to LI config.$lastexpanded.stop().animate({width:config.paneldimensions.peekw}, config.speed) //contract last opened content config.$lastexpanded=$targetli },
Thanks for the help!



Reply With Quote

Bookmarks