Jump to content

Can logo.gif be changed to logo2.gif when someone hovers over a menu?


jewelia

Recommended Posts

Hi there,

 

I am using the default PrestaShop theme (for now) - but it's important to me that when someone hovers over the navigation menu, logo2.gif is displayed instead of the default logo.gif.

 

Can this be done? If so, is there a not horribly complicated way to do it?

 

Thank you!

Julia

Link to comment
Share on other sites

If you're using Prestashop's default theme, your logo is called in the header.tpl file.

 

<a id="header_logo" href="{$link->getPageLink('index.php')}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
 <img class="logo" src="{$img_ps_dir}logo.jpg?{$img_update_time}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />
   </a>

 

To change the logo you could use two different techniques:

- change your image tag via javascript when the user hovers the logo

- change the image when users overs the logo via CSS and using a sprite.

 

I suggest you use the second technique, as it is much lighter (no javascript, just one image to load).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...