[All Adaptavist Apps]

Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Hi,

In Confluence 2.8.2, we used a jQuery script to "decorate" the breadcrumbs. We accessed the ol#breadcrumbs.list element with this simple code :

var breadcrumbs=document.getElementById('breadcrumbs.list');
var currentLvl=AJS.$("breadcrumbs.list").lastChild;

This worked.

Now, we have to upgrade our version of Confluence to 2.10.2
A simple look at the js scripts shows that the AJS object has been modified by developers.

As a result, my code is no longer valid.

I thought that the DOM wasn't completely loaded, so I added an event on a click button to find the ol#breadcrumbs.list element :

AJS.$("#testbutton").bind("click", function () {
var bctestbreadcrumblist=AJS.$("#breadcrumbs.list");
var bctestbutton=AJS.$("#testbutton");
});

(the first var tries to find the #breadcrumbs.list element, the second var tries to find the #testbutton element)

=> Result :
The #breadcrumbs.list is not found (an object with a length of 0)
The #testbutton gives a good object !

When trying to rename the #testbutton element to #test.button (note the dot between the two words, like #breadcrumbs.list), I get the same null object as when trying to retrieve #breadcrumbs.list

So, my question is the following : Is there any known problem when accessing via jquery an element with a "dot" inside its name ?

  • No labels