I wonder wether it would be possible to put the different sections into an array and just start looping and changing the visibility?
joachim
Discussion on:
View:
Show:
visible/invisible changes the UA resolve time taken to DISPLAY the results, but sadly the response time (ie download ) is the same as the number of bytes transferred is the same.
Use <nLoad to prefetch subsequent pages with visibility=false and <nClick to to set visibility=true for info already prefetched.
User reading time is applied to preload the next
page (parallel operations).
Use <nLoad to prefetch subsequent pages with visibility=false and <nClick to to set visibility=true for info already prefetched.
User reading time is applied to preload the next
page (parallel operations).
One problem with the final example in this article is that the visibility style only allows you to "hide" the information, but it still takes up space on the page, meaning you have unneceessary white space. Try using the display style instead. For block level elements ( , , etc.) use "block" and for inline elements ( , ) use "inline".
Code to follow in next post.
Code to follow in next post.
Here is the example using block level display of the divs:
div test
Builder.com Sample
Section 1
Section 2
Section 3
Section 4
Section 1 text.
Section 2 text.
Section 3 text.
Section 4 text.
div test
Builder.com Sample
Section 1
Section 2
Section 3
Section 4
Section 1 text.
Section 2 text.
Section 3 text.
Section 4 text.
you can also do both 
note that I set display to '' rather than 'block'
document.getElementById('section1').style.visibility='visible';
document.getElementById('section1').style.display = '';
document.getElementById('section2').style.visibility='hidden';
document.getElementById('section2').style.display = 'none';
document.getElementById('section3').style.visibility='hidden';
document.getElementById('section3').style.display = 'none';
document.getElementById('section4').style.visibility='hidden';
document.getElementById('section4').style.display = 'none';"
note that I set display to '' rather than 'block'
document.getElementById('section1').style.visibility='visible';
document.getElementById('section1').style.display = '';
document.getElementById('section2').style.visibility='hidden';
document.getElementById('section2').style.display = 'none';
document.getElementById('section3').style.visibility='hidden';
document.getElementById('section3').style.display = 'none';
document.getElementById('section4').style.visibility='hidden';
document.getElementById('section4').style.display = 'none';"
I've got a database application I'm working on (it works in IE and Opera so far) that takes the hidden division to an extreme. It uses remote procedure calls to pull info from the database and write it to hidden division tags on the screen and then can hide it and reopen at will without having to call the data down a second time. It's still early in the development stage so be kind... http://www.customcatalog.us/
See this site: http://web-performance-research.blogspot.com/2008/07/increase-site-performance-by.html
This site has content copied (without consent) from our website as well - so I'm guessing he also stole your content. We've asked him to take it down, I suggest you do the same.
This site has content copied (without consent) from our website as well - so I'm guessing he also stole your content. We've asked him to take it down, I suggest you do the same.
- Keyboard Shortcuts:
- Prev
- Next
- Toggle









































