vec/manj for zgledi

This commit is contained in:
Ozbolt Menegatti 2018-11-02 17:14:11 +01:00
parent 4981f265b8
commit 7572265318

View File

@ -13,7 +13,8 @@
var less_txt = "▲ manj";
$(document).ready(function() {
$(".morelessbutton").click(function() {
var examples_div = $(this).parent().parent().find('.hideable').first();
var parent_with_hideable = $(this).parent().parent().parent();
var examples_div = parent_with_hideable.find('.hideable').first();
if(examples_div.is(":hidden")) {
$(this).text(less_txt);
} else {
@ -139,9 +140,11 @@
<a class="morelessbutton" href="javascript:void(null)"></a>
</div>
<xsl:apply-templates select="pomenska_shema | definicija1 | definicija2"/>
<div> <!-- needed since button goes to third parent... -->
<div class="hideable" style="display: none;">
<xsl:apply-templates select="skladenjske_skupine"/>
</div>
</div>
</xsl:template>
<!-- ********************************
@ -244,11 +247,18 @@
<xsl:template match="kolokacija | r_kolokacija">
<xsl:text xml:space="preserve"> </xsl:text>
<div>
<span class="xslt-kolokacija-head">
<xsl:apply-templates select="ks | p | i"/>
<div class="xslt-morelessbutton-div">
<a class="morelessbutton" href="javascript:void(null)"></a>
</div>
</span>
<xsl:text xml:space="preserve"> </xsl:text>
<div class="hideable" style="display: none;">
<xsl:apply-templates select="zgledi"/>
</div>
</div>
</xsl:template>
<xsl:template match="kolokacije//ks">