umbraco.library:AddJquery() doesn't seem to be working
Hello All,
I've added the runway FAQ module to my project and the call to AddJquery() in faqListQuestions.xslt doesn't seem to be working. When I look at the rendered page in Firebug, there are no references to jquery, but the javascript to show/hide the answer is there.
umbraco.library:AddJquery() doesn't seem to be working
Hello All,
I've added the runway FAQ module to my project and the call to AddJquery() in faqListQuestions.xslt doesn't seem to be working. When I look at the rendered page in Firebug, there are no references to jquery, but the javascript to show/hide the answer is there.
I'm running v 4.0.2.1.
Any suggestions?
Thanks!
-pete-
Me thinks you need a <head runat="server"> in your html for this to be working. Have tried that?
Cheers,
/Dirk
D'oh! Adding runat="server" to the head gets me everytime! That was it. Thanks!
-pete-
Hi!
I have a problem with jQuery too. I am trying to use FAQ package, but animation doesn't seem to be running.
This is my code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<!-- I THINK THE PROBLEM IS HERE -->
<xsl:variable name="animation" select="/macro/animation"/>
<xsl:variable name="title" select="/macro/title"/>
<xsl:template match="/">
<xsl:if test="count($currentPage/node [@nodeTypeAlias='faqQuestComp'])>0">
<xsl:if test="$title!=''">
<h3><xsl:value-of select="$title"/></h3>
</xsl:if>
<xsl:value-of select="umbraco.library:AddJquery()"/>
<xsl:if test="$animation=1">
<script type="text/javascript">
$(document).ready(function(){
$(".faqQuestComp div").hide();
$(".faqQuestComp").click(function () {
$(this).find("div.answer").toggle("fast");
});
});
</script>
</xsl:if>
<xsl:for-each select="$currentPage/node [@nodeTypeAlias='faqQuestComp']">
<div class="faqQuestion">
<span><strong><xsl:value-of select="umbraco.library:RemoveFirstParagraphTag(data [@alias = 'questionText'])" disable-output-escaping="yes"/></strong></span>
<div class="answer"><xsl:value-of select="data [@alias = 'bodyText']" disable-output-escaping="yes"/></div>
</div>
</xsl:for-each>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Could anyone help me?
Thanks!
Hi again!
Don worry about the last post... it is ok now
is working on a reply...