Submenu Col with image

Submenu Col with image was created by m6joe

Posted 3 years 3 days ago #60555
Hello Cedrik, or anybody else!

I´m wondering if it might be possible to give a submenu column a 2nd column to display "on hover/active" each menu-item´s image?

Thanks, Joe
by m6joe

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Submenu Col with image

Posted 3 years 3 days ago #60556
Hi
I see what you mean. This would be possible only with Javascript, and you shall also set the image on each menu item, and this information shall be stored into an attribute
to be clear, this is a specific custom development ...
CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by m6joe on topic Submenu Col with image

Posted 3 years 3 days ago #60557
Well, Cedrik - that was the question! - Thank you for replying.
Looking for time, to try some JS and find the right connection to the menu-id...

But, I´m not hurring about it.
by m6joe

Please Log in or Create an account to join the conversation.

Replied by m6joe on topic Submenu Col with image

Posted 2 years 11 months ago #60572
Finally, I did it:

Submenu with 2 col´s, where the right one shows different images "on hover" the links on the left col.
I used the params-option "access key" to define the image as attribute. The right col has a custom module to show the images, the rest is JS:
Code:
$(document).ready(function() { $('.maximenuck li a, .maximenuck2 li a').hover( function(){ //we get our current filename and use it for the src var linkIndex = $(this).attr("accesskey"); var defaultImg = $('.maximenuck li a').attr("accesskey"); $(this).addClass('hover'); $('.box img').attr('src', path+linkIndex+'.jpg'); }, function(){ $(this).removeClass('hover'); $('.box img').attr('src', path+defaultImg+'.jpg'); } ); });

To show how it works, please be patient, I´m going online with my new site within a few weeks on www.apart-tuxertal.at

Joe
by m6joe

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Submenu Col with image

Posted 2 years 11 months ago #60576
great :) thank you for sharing the solution, just that the line with "defaultImg" is useless, you never use this variable in your code

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 0.744 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 289 guests and 2 members online