Board Logo

Graphics for top-level items
Bewildered - 3/30/2007 at 02:53 PM

How do I use graphics ("on" and "off" images for mouseover and mouseout) instead of text for the top-level (level 0) items?

I understand that this would involve some hand-coding in certain files. I'm fine with that. I just want to know exactly how to do it -- especially for the horizontal template.

Thank you.


tigra - 3/30/2007 at 04:15 PM

You don't need to change the core script files. All is done via the configuration files. Check out:
http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_caption

You can use the same technique but instead of <span style...> specify <img src...> for different states of the item.


Bewildered - 3/30/2007 at 11:05 PM

Great! Sounds good. However, Ia??m not sure what to change, and where. The link...

http://www.softcomplex.com/products/tigra_menu_gold/docs/#items_caption

...shows code beginnig with...

var MENU_ITEMS = [

...and containing lines starting...

'<span style="

But in my menu_files...

var MENU_ITEMS = [

...appears only in items.js, where each item has only one line that looks like...

['Home', 'http://mydomain.com/index.htm'],

Neither of the following code elements appear anywhere in menu_files...

// level 0
'<span style=

Therefore, I dona??t know where to make the changes.

Thank you.


tigra - 3/31/2007 at 01:24 AM

That's the 'Home' part that needs to be replaced with the array of three stirngs. For example if you try:

[['Home1', 'Home2', 'Home3'], 'http://mydomain.com/index.htm'],

you'll see Home1 in normal state, Home2 in mouseover and Home3 in mousedown. Now just replace that text with the HTML code including images and you're all set.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/