Hello everyone,
In our desktop application I have built the main navigation using button controls, where each button loads a defined view. My idea is that the default view is loaded by triggering a click-event on the first button once the page has loaded. Unfortunately, it's not working as expected.
The basic code I am running is:
onAfterRendering : function() {
$('#navigation button').eq(0).click();
},
After which nothing happens. What confuses me though is that if I run:
onAfterRendering : function() {
console.log(
$('#navigation button').eq(0),
$('#navigation button').eq(0).click);
},
I get exactly what you'd expect; the right button and the function reference.
So the button is present in the DOM, it can be found and the function click(...) exists. Furthermore, if I run the code in e.g. Firebug's console, the event is triggered just fine.
What am I missing here?