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 :
<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
      
    <{
assign var=start value=1}>
      <{foreach 
item=imenu from=$block.contents}>
      <{if 
$imenu.link != ""}>
        <{if 
$start}>
              <
class="menuTop" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}>a>
          <{
assign var=start value=0}>
        <{else}>
          <{if 
$imenu.sub == "1"}>
                  <
class="menuSub" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages }>(<span style="color:#ff0000; font-weight: bold;"><{$imenu.messages}>span>)<{/if}>a>
          <{else}>
              <
class="menuMain" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages }>(<span style="color:#ff0000; font-weight: bold;"><{$imenu.messages}>span>)<{/if}>a>
          <{/if}>
        <{/if}>
        <{else}>
            <{
$imenu.title}>
        <{/if}>
      <{/foreach}>
      
    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) :
<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({
            
activefalse,
            
header'.menuTop',
            
navigationtrue,
            
event'mouseover',
            
fillSpacetrue,
            
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}>
            <
class="menuTop" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}>a>
            <
ul>
          <{
assign var=start value=0}>
        <{else}>
          <{if 
$imenu.sub == "1"}>
            <
li><class="menuSub" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages }>(<span style="color:#ff0000; font-weight: bold;"><{$imenu.messages}>span>)<{/if}>a>li>
          <{else}>
            ul>      
            li>
            <
li>
            <
class="menuTop" href="<{$imenu.link}>" target="<{$imenu.target}>"><{$imenu.title}> <{if $imenu.messages }>(<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

Login

Who's Online

307 user(s) are online (194 user(s) are browsing Support Forums)


Members: 0


Guests: 307


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits