Handling initial display states for jQuery-enhanced pages
When building a jQuery-enhanced site (or using any other JavaScript library, for that matter) I find one of the tasks I use jQuery for is to set the initial display states of various elements on the page.
For instance, you may have some elements that should only be displayed if JavaScript is enabled; and some which should be hidden. But what do you do to avoid the flash of unwanted content which may appear before various libraries load? Here's my solution...
5 comments
Posted on 26 August, 2009, in JavaScript, Quick Tips, jQuery