A: 

Strictly speaking, you load() can take a selector after the url and only return a part of the ajax call.

So, something like:

$('#name_div').load('/path/yourXmlFile.xml name:first');

Now, making network calls every time you want to look at something is not very efficient. You probably want to cache the output into a variable.

artlung
Good point. I'm not limited to that method of display--it's just something I've experimented with. Currently, the source of the file displaying the whole grid already HAS all of the data I need to display in XML. Any insight on how I could display that already loaded data into the div based on which image I've rolled over?
Andrew Parisi
You need to create an association between what's in the xml and your divs. Perhaos into the images rolled over you would add an id like `id="image-55"` then in your xml you have a structure that also embeds the id, like `<container id="image-55">...</container>`
artlung
A: 

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.

Andrew Parisi
@Andrew - Please edit your question and put this extra information there itself, rather than posting it as an answer. A mod can then delete this answer for you.
Anurag
Done. please delete, mod! Sorry 8)
Andrew Parisi
+1  A: 

Preserving the semantics of your page and the structure of your stylesheet, I try to do something like this:

<xsl:for-each select="portfolio/company"> 
     <xsl:sort select="name" /> 
     <div class="invest-port-thumb"> 
       <a href="{link}"><img src="{logo-thumb}" /></a>
       <div class="preview"> 
         <div class="preview-name"><xsl:value-of select="name" /></div> 
         <div class="preview-desc"><xsl:value-of select="sdesc" /></div> 
       </div> 
     </div> 
</xsl:for-each>

Then, in CSS stylesheet, you can use :hover pseudoclass and + combinator to show or hide preview. There ara some problems with crossbrowser compatibility. You should check Stu Nicholls site for better semantics and CSS examples.

Alejandro
The preview box will always be visible, and contain the information of the last company rolled over until you roll over a new one...The problem with using value-of, is that it will only pull the first <name> node out of my XML file, instead of the one I hover on.
Andrew Parisi
@Andrew: You want to make asynchronous something that it's synchronous! You have all the data in XML document. Then transform that whith XSLT. At last, apply style with CSS (add a link element in your transformation, of course). The complexity is not in XSLT (The one I'd posted worked just fine. If you'll post your complete stylesheet we could help you more). The complexity is in cross-browser CSS for your layout. Check the Nicholls' site for example. For living example of what I'm talking about check one of my sites: http://www.aranedabienesraices.com.ar
Alejandro
I agree with Alejandro. You need to get the HTML loaded like you want from the XSLT. Then you can hide all the DIVs other than the one being previewed. You could also give each preview-data DIV an ID and then load the preview DIV with the preview-data based on that ID. The ID could correspond to whatever the user's are hovering on.
JoshNaro
A: 

I would feed the name and desc into the anchor as part of the anchor or it's child image, perhaps using the ALT tag for the name and REL tag for the description.

On hover over any anchor, I'll use jQuery [.attr()] to grab the attribute values containing the name and description you want and spit that into your respective target DIVs.

(See 'Recipe Categories' in http://www.masterchef.com.au/home.htm for similar example)

Brandon