As i implemented fixed sidebar with scrollable content here(will add howto soon), Im trying to go further and reload only the contentcolumn div when sidebar navigation link is clicked.
I use this jsx:
require(['jquery', "$!services.webjars.url('org.xwiki.platform:xwiki-platform-tree-webjar', 'require-config.min.js', {'evaluate': true})"], function($) {
require(['tree'], function($) {
$('.xtree').on("click", "a",function (e, data) {
e.preventDefault();
$("#contentcolumn").load(this.href + " #contentcolumn" );
});
});
});
This code works, center column is updated, but for some reason preventDefault doesnt work thus whole page is eventuelly reloaded.
Do you have any clue why is that?
I have already tried stopPropagation, stopImmediatePropagation and return false - but still the same result. It works everywhere but not inside of Tree Macro.