Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pete McQuain 2 posts 22 karma points
    Jan 25, 2010 @ 16:29
    Pete McQuain
    0

    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-

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 25, 2010 @ 17:00
    Dirk De Grave
    0

    Me thinks you need a <head runat="server"> in your html for this to be working. Have tried that?

     

    Cheers,

    /Dirk

  • Pete McQuain 2 posts 22 karma points
    Jan 25, 2010 @ 19:43
    Pete McQuain
    0

    D'oh! Adding runat="server" to the head gets me everytime! That was it. Thanks!

    -pete-

  • sauritas 37 posts 57 karma points
    Aug 30, 2010 @ 10:30
    sauritas
    0

    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 "&#x00A0;"> ]>
    <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'])&gt;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!

     

  • sauritas 37 posts 57 karma points
    Aug 30, 2010 @ 16:44
    sauritas
    0

    Hi again!

     

    Don worry about the last post... it is ok now

Please Sign in or register to post replies

Write your reply to:

Draft