appframework
appframework copied to clipboard
$("#home").on('panelload', function() { alert("i'm start")}) when app first start is not works
afui3.0 $("#home").on('panelload', function() { alert("i'm start")}) when app first start is not works but other panel like $("#help").on('panelload', function() { alert("i'm help")}) is working can you tell me why? @imaffett
Yes, default panel with active class, will has no event on app start! now ,I trigger it myself!
Can someone put a demo up replicating this?
On AFUI 3, when you have a function that is to be executed once the app loads, do not use:
$("#home").on('panelload', function() { alert("i'm start")})
rather use the following: $.afui.ready(function(){alert("i'm start");});
Works perfectly.
Did you figure this out? When are you adding the handler?
If you disable autolaunch, and setup the onLoad handler before you call $.afui.launch(), it the panelLoad should be triggered.
It might not be firing because the panel is loaded before you setup the onLoad event handler.