Helpful Notes: jQuery Mobile navbar and footer (O4W)
At 15 JUL 2020 11:55:22AM bshumsky wrote:
Helpful Notes will be a series (?) of postings derived from emailed questions and answers that may be helpful to others
I see in JQuery Mobile examples they use a "Navbar" in the footer instead of buttons like I'm using. I prefer a Navbar since the touch area is larger than the size of the buttons.
Can this be done with O4W Mobile?
Yes, you can use a navbar (either in the header or the footer). Here's some code that illustrates how to do it:
o4wsectionstart("MyNavbarSection", o4wmobileoptions("navbar" ))
Items in a navbar are "list" itemsO4WLISTSTART("0", "MyNavbarItems" )
make a list item for each navbar elemento4wlistitem()o4wlink("Option 1", O4W_LINKTYPE_NORMAL$, "https://www.revelation.com" )o4wlistitem()o4wlink("Option 2", O4W_LINKTYPE_NORMAL$, "https://www.google.com" )
etc. - repeat as needed for the other navbar elementso4wlistend("MyNavbarItems" )o4wsectionend("MyNavbarSection" )The navbar will always be horizontal, and it is sized according to how many options you specify - 1 will take the whole bar, 2 will split it 50/50, etc.
If you want to put the navbar in the footer, as a "fixed" footer, then you would surround the navbar section with a footer section:
o4wsectionstart("MyNavbarFooter", o4wmobileoptions("footer","b" ) : O4WDataStyle("", "data-position", "fixed" ))
o4wsectionstart("MyNavbarSection", o4wmobileoptions("navbar","b" ))
... do all of the ListItem stuff ...o4wsectionend("MyNavbarSection" )
o4wsectionend("MyNavbarFooter" )
- Bryan Shumsky