1
Burning
iMenu and accordeon
  • 2009/10/4 23:32

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi'

I'm trying to add Accordeon script (JQuery) to iMenu block.
My aim is to display submenus :
• by pointing mouse on Main link
• and without necessary display module page
... iMenu behavior is the same than Main menu block : submenus are displayed only for active module on page.

Block template code is :
le="color: #000000"><?php <table cellspacing="0"> <tr> <td id="mainmenu"> <!-- start module menu loop --> <{assign var=start value=1}> <{foreach item=imenu from=$block.contents}> <{if $imenu.link != ""}> <{if $start}> <a class="menuTop" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}></a> <{assign var=start value=0}> <{else}> <{if $imenu.sub == "1"}> <a class="menuSub" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages > 0 }>(<span style="color:#ff0000; font-weight: bold;"><{$imenu.messages}></span>)<{/if}></a> <{else}> <a class="menuMain" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages > 0 }>(<span style="color:#ff0000; font-weight: bold;"><{$imenu.messages}></span>)<{/if}></a> <{/if}> <{/if}> <{else}> <{$imenu.title}> <{/if}> <{/foreach}> <!-- end module menu loop --> </td> </tr> </table>


... it seems that it is not possible to do what I would with this code. Is someone can give me some advice ?

Thanks in advance


nb : sorry for my bad english

2
Burning
Re: iMenu and accordeon
  • 2009/10/30 20:05

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


Thanks someone! Wonderful

(I send a PM to jegelstaff)

3
jegelstaff
Re: iMenu and accordeon
  • 2009/12/21 22:39

  • jegelstaff

  • Module Developer

  • Posts: 518

  • Since: 2004/7/2 2


This is very neat, thanks very much for sharing. We will see about including this in our next iMenu release.

--Julian

4
Burning
Re: iMenu and accordeon
  • 2010/6/17 22:19

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi',

I was looking for a nice hack coded by someone... it was in this thread.

Where ? there is nothing today, and why "someone" has been replaced by "someone"
Still learning CSS and... english

5
Burning
Re: iMenu and accordeon
  • 2010/6/17 22:26

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


Me again...

Hack is here (it was on pc) :
le="color: #000000"><?php <script type="text/javascript" src="<{$xoops_url}>/jquery-accordion/lib/jquery.js"></script> <script type="text/javascript" src="<{$xoops_url}>/jquery-accordion/lib/jquery.easing.js"></script> <script type="text/javascript" src="<{$xoops_url}>/jquery-accordion/lib/jquery.dimensions.js"></script> <script type="text/javascript" src="<{$xoops_url}>/jquery-accordion/jquery.accordion.js"></script> <script type="text/javascript"> jQuery().ready(function(){ // second simple accordion with special markup jQuery('#navigation').accordion({ active: false, header: '.menuTop', navigation: true, event: 'mouseover', fillSpace: true, animated: 'easeslide' }); }); </script> <div style="margin-bottom:1em;"> <ul id="navigation"> <li> <{assign var=start value=1}> <{foreach item=imenu from=$block.contents}> <{if $imenu.link != ""}> <{if $start}> <a class="menuTop" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}></a> <ul> <{assign var=start value=0}> <{else}> <{if $imenu.sub == "1"}> <li><a class="menuSub" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages > 0 }>(<span style="color:#ff0000; font-weight: bold;"><{$imenu.messages}></span>)<{/if}></a></li> <{else}> </ul> </li> <li> <a class="menuTop" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages > 0 }>(<span style="color:#ff0000; font-weight: bold;"><{$imenu.messages}></span>)<{/if}></a> <ul> <{/if}> <{/if}> <{else}> </ul> </li> <li> <{$imenu.title}> <ul> <{/if}> <{/foreach}> </ul> </li> </ul> </div>


... but someone ?
Still learning CSS and... english