Submenu Col with image

More
3 years 9 months ago #60555 by m6joe
Submenu Col with image was created by m6joe
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

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

More
3 years 9 months ago #60556 by ced1870
Replied by ced1870 on topic Submenu Col with image
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

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

More
3 years 9 months ago #60557 by m6joe
Replied by m6joe on topic Submenu Col with image
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.

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

More
3 years 8 months ago #60572 by m6joe
Replied by m6joe on topic Submenu Col with image
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

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

More
3 years 8 months ago #60576 by ced1870
Replied by ced1870 on topic Submenu Col with image
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

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

Time to create page: 0.208 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 875 guests and no members online