Skip to content

Instantly share code, notes, and snippets.

@ma8bi4ne
Last active December 17, 2015 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ma8bi4ne/3e5cd45d6ce74f16bce1 to your computer and use it in GitHub Desktop.
Save ma8bi4ne/3e5cd45d6ce74f16bce1 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$( document ).ready(function() {
$('span.lnk').live("click", function(){
var id = $(this).attr('title');
var firstname = '';
var lastname = '';
<xsl:for-each select='/data/keypeople/entry'>
var firstname["<xsl:value-of select='@id'/>"] = '<xsl:value-of select="firstname"/>';
var lastname["<xsl:value-of select='@id'/>"] = '<xsl:value-of select="lastname"/>';
var funktion ["<xsl:value-of select='@id'/>"] = '<xsl:value-of select="function"/>';
var country["<xsl:value-of select='@id'/>"] = '<xsl:value-of select="country"/>';
var description["<xsl:value-of select='@id'/>"] = '<xsl:value-of select="description"/>';
</xsl:for-each>
var name2 = firstname["124"];
//just trying to get any output
$('#keypeople_mycontent').html(name2);
})
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment