I am trying to add this jQuery Tabs to my nodes in Drupal 6.x, so the user can paste a text in a CCK Field and it will render it in a Tab. So I made this try:
1. page.tpl.php: in the header will be
<header>
<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>
</header>
<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>
</header>
2. in my node-content.tpl.php: here in the body will be the HTML and the script:
<ul class="tabs">
<li>tab1</li>
<li>tab2</li>
<li>tab3</li>
</ul>
<div class="panes">
<div style="display: block;"><?php $field_1 ?></div>
<div style="display: none;"><?php $field_2 ?></div>
<div style="display: none;"><?php $field_3 ?></div>
</div>
<script>
function() {
$("ul.tabs").tabs("div.panes > div");
};
</script>
<li>tab1</li>
<li>tab2</li>
<li>tab3</li>
</ul>
<div class="panes">
<div style="display: block;"><?php $field_1 ?></div>
<div style="display: none;"><?php $field_2 ?></div>
<div style="display: none;"><?php $field_3 ?></div>
</div>
<script>
function() {
$("ul.tabs").tabs("div.panes > div");
};
</script>
3. CSS: this is the only thing working so far.
Has anyone a suggestion of why it is not working???
Thanks.
Read »








