jquery / jquery/api.jquerymobile.com
Library: Document that, when using requirejs, a page should only be instantiated after the whole library is loaded, otherwise it may fail to instantiate some widgets
Open
@gabrielschulhof is already working on this.
Since Oct 14, 2014.
- Dominant language
- HTML
- Stars
- 55
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
We need to provide an example of a scenario where somebody uses the library using requirejs, and maybe skips init altogether. For example,
require([
"jqm/widgets/popup",
"jqm/widgets/listview",
"jqm/widgets/page" ], function() {
$( function() {
$( "#start-page" ).page();
});
};
Will not work if requirejs loads page after it has loaded popup and listview. We need to document that, in 1.4.x, one needs to require page before requiring any of the widgets:
require([
"jqm/widgets/page" ], function() {
require([
"jqm/widgets/popup",
"jqm/widgets/listview" ] ,function() {
$( function() {
$( "#start-page" ).page();
});
});
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.