是否可以使div响应单个类属性?

时间:2016-02-18 06:57:04

标签: javascript jquery html css xslt

我有以下代码。单击放大试用按钮时,应该弹出幻灯片弹出窗口。但现在它在div中执行整个代码堆栈。

我的班级有两个班级(cloud-zoom-gallery和fancybox-effects-d)。无论如何我还能让它只响应fancybox-effects-d类?

或者,也许,有些我可以编写js代码来执行fancybox-effects-d类吗?

<a id="btnenlargetrial" href="#">Enlarge trial </a>
<!--gallery-->
<xsl:if test="count($gallery/item) > 0" >
    <div id="enlargetrial" class="hidden">
        <ul id="mycarousel" class="jcarousel-skin-tango" >
            <xsl:for-each select="$gallery/item" >
                <xsl:variable name="picSmall" select="picSmall" />
                <xsl:variable name="picNormal" select="picNormal" />
                <xsl:variable name="picLarge" select="picLarge" />
                <xsl:variable name="description" select="description" />
                <li style="height:{$gallery/@forceHeight}px;" >
                    <a  href="{$picLarge}"class="cloud-zoom-gallery fancybox-effects-d"title='{$description}'rel="useZoom: 'zoom1', smallImage: '{$picNormal}' "data-fancybox-group="gallery" >
                        <xsl:choose>
                            <xsl:when test="$gallery/@forceWidth != '' " >
                                <img src="{$picSmall}" alt="{$description}" height="{$gallery/@forceHeight}" width="{$gallery/@forceWidth}" border="0" />
                            </xsl:when>
                            <xsl:otherwise>
                                <img src="{$picSmall}" alt="{$description}" height="{$gallery/@forceHeight}" border="0" />
                            </xsl:otherwise>
                        </xsl:choose>
                    </a>
                </li>
            </xsl:for-each>
        </ul>
    </div>
</xsl:if>

0 个答案:

没有答案