stevenhu — 2012-11-29T14:51:11-05:00 — #1
If I have a series of divs labeled page1, page2, page3, page4, then how do you use the show/hide div method to turn on/off the correct pages?
Specifically, how does a button on one of the page divs turn on one page while turning off all the other pages?
There are many web page explaining how to show/hide divs, or make "navigation bars" to show/hide nav links, but the ones really discussing navigating across several pages use Jquery. But I don't want the overhead of Jquery for this simple function, because this will be in a mobile phone app.
kohoutek — 2012-11-29T15:47:20-05:00 — #2
stevenhu — 2012-11-29T15:49:25-05:00 — #3
Tabs? In my case, the page contents should replace all other content. No tabs allowed.
kohoutek — 2012-11-29T15:57:50-05:00 — #4
The example shows tabs but the functionality is the same, no?
stevenhu — 2012-11-29T15:58:40-05:00 — #5
I will implement and adapt, then. Thanks!
ralphm — 2012-11-29T18:38:36-05:00 — #6
How do people then switch from page to page? I'm confused. You can also use accordions for this, but I'm not clear on what you are picturing. Show/hide functionality normally relates to content that's all on one page.
stevenhu — 2012-11-29T18:44:30-05:00 — #7
Indeed, I want all the content on one page. The user will navigate back from a page div just like with a Jquery-type Back button at top and/or bottom.
My page will have a pre-populated database; on body load, all the page divs will be populated with content, but the content won't be seen until the page div is visible for that section.
ronpat — 2012-11-29T19:01:19-05:00 — #8
But I don't want the overhead of Jquery for this simple function, because this will be in a mobile phone app.
But you don't mind if the users on their mobile phones sustain the overhead of loading hidden data that they may not want to see?
stevenhu — 2012-11-29T19:07:27-05:00 — #9
Are you saying that Jquery will not load items when they are all on one page as hidden divs?
ronpat — 2012-11-29T19:18:10-05:00 — #10
Not at all. I am commenting about priorities.
The "friendly" method is to serve one page at a time, therefore the users on mobiles who do not want to see the whole show do not use up their bandwith unnecessarily.
If the amount of hidden data is relatively small, then no problem; but if it is large, sending all of it to an unsuspecting user is unkind. Serving one page at a time would be more considerate of the mobile user's bandwidth usage.
picnictutorials — 2012-11-29T22:38:28-05:00 — #11