Using Glossary 1.0, I used the new template "jQuery-open-close". I want to display definition directly in the text, using the accordion jquery magic. But I couldn't find how.
Inline option throws a link to some other page.
Just set {Glossary term="term"} do it, but the problem is output a <h3> in the middle of the text. Even if I changed in glossary template to whatever <p> or <span> with a "display:inline", it doesn't work, as a <div> is inside a <p> and don't display fine. Does someone how I can do it?
Example:
Code: Select all
text before {Glossary term="ABC"} text after
HTML output:
<p>text before
<__script__ type="text/javascript">
//<![CDATA[
$(function() {
$('.accordion').accordion({
collapsible: true,
active: false,
autoHeight: false
});
});
//]]>
</__script>
<div class="accordion">
<span class="def" title="ABC">ABC</span>
<div>definition</div>
text after</p>
Code: Select all
<__script__ type="text/javascript">
//<![CDATA[
$(function() {
$('.accordion').accordion({
collapsible: true,
active: false,
autoHeight: false
});
});
//]]>
</__script>
<div class="accordion">
{foreach from=$items item='item'}
<h3 {if isset($item.tip) && $item.tip != ''}title="{$item.tip}"{/if}>{$item.name}</h3>
<div><p>{$item.definition}</p></div>
{/foreach}
</div>