Upon reviewing the demonstration available at http://www.jankoatwarpspeed.com/examples/AdvancedDocking/, you will come across this particular section of code:
$("#dock li").hover(function(){
$(this).find("ul").animate({left:"40px"}, 200);
}, function(){
$(this).find("ul.free").animate({left:"-180px"}, 200);
});
The suggested modification is as follows:
$("#dock li").click(function(){
if($(this).find("ul").css("left") != "40px") {
$(this).find("ul").animate({left:"40px"}, 200);
}
else
{
$(this).find("ul").animate({left:"-180px"}, 200);
}
});
Transitioning from hover to click (or utilizing toggle) is advised. Additionally, certain CSS adjustments are required:
Eliminate:
#dock > li:hover ul {display:block;}
Replace display:none with display:block
#dock > li ul {position:absolute; top:0px; left:-180px; z-index:-1;width:180px; display:block;
background-color:#F1F1F1; border:solid 1px #969696; padding:0px; margin:0px; list-style:none;}