Updating DIV with XML content on Hover (JQuery)
Posted
by Andrew Parisi
on Stack Overflow
See other posts from Stack Overflow
or by Andrew Parisi
Published on 2010-06-14T15:21:03Z
Indexed on
2010/06/14
15:22 UTC
Read the original article
Hit count: 164
Hi everyone!
The concept of what I'm trying to do is fairly simple. I have a grid of company logos loaded through XSLT from an XML document, each with their own unique links to the company profiles.
I have a separate div on the page, essentially a "preview" box. What I want to do is this:
I roll over a logo, and it loads the name of the company and a short description into the preview div. This content is loaded through XML.
I have been messing around with the Jquery load() function, changing the target document to load on Hover—and it almost gets what I want, but it loads the whole target XML document into the div.
How can I separate this target XML data into separate divs? (which I have styled differently)
I'd assume I would make use of Ajax in some way. I want to load the <name>
node into the name_div, and the <desc>
node into the description_div, and have them update on hover. Thanks in advance for the help!
© Stack Overflow or respective owner