Hello to everybody,
I have to create a menu tied with some content on a single page (not load new page on every single link). The result that I need is similar to Olives .
The problem is that I don’t want to use sprys menus. The reason is that if I scroll to the bottom of tab 1, then select tab 2, the scrollbar remains at the bottom (or wherever it was last positioned on tab 1. You can see the problem on Olives .
As you can see at the above code I can get the “hover” effect that I need and the “focus” effect but I want the “focus” to stay still –indicate to the visitor what tab she/he had selected- (to disable the previous and enable the next when and if clicked only, not disabled when I click anywhere in the page).
You’d be surprised, I’m not that adverse to it… know why? You posted why:
Which is the thing – with 3k of plaintext in the example, the max each page-load as separate pages should be is around 8k (probably more like 6k) – with everything else on the page being cached as external CSS and external scripts is a 6k page-load for all sub-pages past the first … REALLY so painful you have to pull stupid code tricks to avoid it?!?
You know, semantic markup allowing for separation of presentation from content minimizing how much stuff the sub-pages have to load… It’s called “leveraging caching models”
Of course if one is using 15k of presentational markup BEFORE you count the iframe because it’s got classes, ID’s, DIV’s and SPAN around EVERYTHING for no good reason with nothing even remotely RESEMBLING semantic markup (much less valid working markup), presentational images in the markup, inlined scripting doing target and frameset’s job… YMMV.
Yes, it’s a hopeless equation. The only way I can think of justifying jQ is that it may have lots of other uses on a page/site, meaning that the download was not just for one little set of tabs. Grabbing jQ from Google also helps with speed and caching, too.
Which is the thing – with 3k of plaintext in the example, the max each page-load as separate pages should be is around 8k (probably more like 6k) … REALLY so painful you have to pull stupid code tricks to avoid it?!?
Yes, there’s not much to say against having a few page loads. Although, with content like in the OP’s example, I’d still be tempted to put it all on one page and break up the content with headings. I prefer one long page than having to click to go to new pages. (I’ve set SP to display the max 200 posts in each thread, for example.) Whether it’s broken up with tabs or not isn’t really important to me. I’ve only used that script I posted once for someone who insisted on it. In his case, it did make things neater just to display information on a state-by-state basis, but the info was part of a larger page, so it didn’t really work to have it spread across pages.