Category image rollover

  • Posts: 12
  • Thank you received: 1
11 years 10 months ago #84700

Hi,

Can some one help please, I would like the image assigned to a category to rollover to a different image on mouse over. Is this possible.

Thanks

Gavin

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #84732

Hi,

Yes it's possible, you have to edit the view "category / listing_img_title" (if you want the edition in this listing of categories) in HikaShop > Display > Views.
And add a onMouseOver on the <a ..> link.

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

  • Posts: 12
  • Thank you received: 1
11 years 10 months ago #84890

Sorry can't see where to put the on mouse over event in the code. Can you point it out for me please

View file content removed by a moderator.
We do have content of the views, don't worry :)

Last edit: 11 years 10 months ago by Jerome.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #84981

The code to edit is:

	<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->category_name); ?>">
		<?php
		echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x,  $this->image->main_thumbnail_y);
		?>
	</a>
Try to add the onMouseOver in the <a ...> tag, like: "<a href="<?php echo $link;?>" onmouseover="changeImage();" title="<?php echo $this->escape($this->row->category_name); ?>">"
Then create the function changeImage to display one image or the other one when overred.

It require some JavaScript knowledge.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum