I have a backbone.js / jquery mobile app:
when I do a GET for mydomain.com/#map, then jquery does "/" and then loads #map.
because "/" is started first, all backbone.js scripts are loaded, including the backbone.js routes in my map-controller.js ("map": "functionForMapRoute"). since the url contains / # map, the backbone.js route "map" is started before jQuery mobile provided dom.
therefore the function "functionForMapRoute" cannot work on a div because the DOM is not fully loaded at this point.
How can I guarantee that the "map" route only starts until the DOM is fully loaded?
source
share