| 1 |
Drupal.behaviors.apiExpandable = function() {
|
| 2 |
$('div.api-expandable:not(apiExpandableProcessed)').each(function() {
|
| 3 |
$(this).addClass('apiExpandableProcessed')
|
| 4 |
.children('div.prompt').find('a.show-content').click(function() {
|
| 5 |
$(this).parents('div.api-expandable').eq(0)
|
| 6 |
.children('.prompt').hide().end()
|
| 7 |
.children('.content').show();
|
| 8 |
return false;
|
| 9 |
}).end().end()
|
| 10 |
.children('div.content').find('a.hide-content').click(function() {
|
| 11 |
$(this).parents('div.api-expandable').eq(0)
|
| 12 |
.children('.prompt').show().end()
|
| 13 |
.children('.content').hide();
|
| 14 |
return false;
|
| 15 |
});
|
| 16 |
});
|
| 17 |
};
|