Expandable submenu

About the template and stylesheet - and changing the menu
Post Reply
Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Expandable submenu

Post by Tata » Sun Jan 04, 2015 10:53 pm

Have a look at [url=http://cmsimple_xh_164.cmsimple.sk/]this template[/url]. Mz intention was not the template but the modified function submenu. It was discussed here some days ago.
The template is downloadable incl. the tlpfuncs.php file.
Any comments are welcome.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Expandable submenu

Post by manu » Mon Jan 05, 2015 9:41 am

nice idea, but seems not to work on iOS..
How about some transition?

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Expandable submenu

Post by Tata » Mon Jan 05, 2015 4:34 pm

I have found very simple sollution. Hopefully it will work for you. It works for me on my iPad at least. See on http://www.codehaven.co.uk/fix-css-hove ... hone-ipad/.
The change is actualized in Download.
If you want to use the hower trick elswhere, just add into the div where the hower shall be applied

Code: Select all

onclick=""
In my example it shall go in tplfuncs.php. Look for

Code: Select all

...
        if (count($ta) != 0) {
            return '<h4>' . $tx['submenu']['heading'] . '</h4>'
                . li($ta, 'submenu');
...
and extend it to

Code: Select all

...
            return '<div class="submenu"  onclick=""><a><h4>' .$tx['submenu']['heading'] . '</a></h4>'
                . li($ta, 'submenu').'</div>';
...
That's all :-D
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Expandable submenu

Post by manu » Mon Jan 05, 2015 4:50 pm

This is it!

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Expandable submenu

Post by Tata » Mon Jan 05, 2015 5:17 pm

:-)
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Expandable submenu

Post by cmb » Mon Jan 05, 2015 9:05 pm

Tata wrote:If you want to use the hower trick elswhere, just add into the div where the hower shall be applied

Code: Select all

onclick=""
Very interesting! :) A while ago maeg reported a similar issue, and it could be resolved by changing the element for which :hover should be applied to an <a>. I assume, that the onclick trick would also have worked.
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Expandable submenu

Post by Tata » Mon Jan 05, 2015 9:57 pm

it works for me and I see the advantage in using this trick because if wrapping in <a></a>, there occure problems with further styling.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply