Let me try to be a bit more specific. Here are some examples:
portfolio.xml file (this file is my main page, displaying the grid and preview div, example uses 3 companies):
<portfolio>
<company>
<name>ABC Company</name>
<sdesc>Consumer products</sdesc>
<logo-thumb>abcco.jpg</logo-thumb>
<link>abcco.xml</link>
</company>
<company>
<name>DEF Company</name>
<sdesc>Communications firm</sdesc>
<logo-thumb>defco.jpg</logo-thumb>
<link>defco.xml</link>
</company>
<company>
<name>GHI Corporation</name>
<sdesc>Electronic products</sdesc>
<logo-thumb>ghico.jpg</logo-thumb>
<link>ghico.xml</link>
</company>
</portfolio>
The following XSLT displays that code on the page:
<xsl:for-each select="portfolio/company">
<xsl:sort select="name" />
<div class="invest-port-thumb">
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<img>
<xsl:attribute name="src">
<xsl:value-of select="logo-thumb" />
</xsl:attribute>
</img>
</a>
</div>
</xsl:for-each>
This is the HTML structure of the "preview div":
<div id="preview">
<div id="preview-name"> [Name to display here] </div>
<div id="preview-desc"> [Description to display here] </div>
</div>
All 3 company logos are loaded into the page, each displaying a linked image loaded from <logo-thumb>
. Desired effect is to on hover, display the contents of <name>
in the "preview-name" div, and the contents of <sdesc>
in the "preview-desc" div.