3
and there is what I managed to use myself
It helps some blocks not to be annoying. U can check at
http://somsa.ktusa.lt/xoops/ (click block Titles :)
theme.html: in column template code I put sth like this
<{foreach item=block from=$xoops_lblocks}> <span style="cursor:hand; cursor: pointer;" onclick="toggle('<{$block.title}>');" >
<div class="blockTitle"><{$block.title}>div>span>
<div id="<{$block.title}>" class="blockContent"><{$block.content}>div>
<{/foreach}>
Block template Edit: to hide block content initially
<div id="Recent Topics_inside" style="display:none">
template code...
div>
well, here things depend on "Block Title", so they are kind of hardCoded :\, bul efect is worth it :).
js could be included directly in
xoops.js or after it in
theme.html file.
<script type="text/javascript">
script>
<script type="text/javascript">
script>
would be useful some cookie or other session stuff to remember, whicth blocks (contents) (in)visible
some other block-dynamics examples:
http://www.dynamicdrive.com/dynamicindex17/agallery.htmhttp://simon.incutio.com/code/js/easytoggle/example2.htmlhttp://www.dyn-web.com/dhtml/slide/slide-onclick.html