I'm trying to customize the look of Confluence with Javascript and I'm still doing some experiments. So I wrote:
AJS.toInit(function () {
AJS.$('.name a').text('test');
});
This changed the space name all right. Then I wanted to change the page titles in the left sidebar dynamically. So I wrote:
AJS.toInit(function () {
AJS.$('.plugin_pagetree_children_content span a').text('test');
});
Then this was not working! I'm not very good at programming, but I'm guessing this was related to elements not loading when my script ran. Could someone help me? Thanks in advance!