| 1 |
/**
|
| 2 |
* TaxTreeNodes collapse/expand
|
| 3 |
*
|
| 4 |
*/
|
| 5 |
|
| 6 |
Drupal.taxtreenodestoggle = function () {
|
| 7 |
// attach the onclick handlers to show comments
|
| 8 |
$('a.taxtreenodestoggle').click(function()
|
| 9 |
{
|
| 10 |
$(this).next('ul').toggle();
|
| 11 |
$(this).next('ul').next('ul').toggle();
|
| 12 |
return false;
|
| 13 |
}
|
| 14 |
);
|
| 15 |
|
| 16 |
// hide all comments on page display
|
| 17 |
$('a.taxtreenodestoggle').each(function() {
|
| 18 |
$(this).next('ul').toggle();
|
| 19 |
$(this).next('ul').next('ul').toggle();
|
| 20 |
});
|
| 21 |
}
|
| 22 |
|
| 23 |
// Global killswitch
|
| 24 |
if (Drupal.jsEnabled) {
|
| 25 |
$(document).ready(Drupal.taxtreenodestoggle);
|
| 26 |
}
|
| 27 |
|