Table of Contents

Clientcide

docs

This file contains the Clientcide namespace which includes only two things: the version you downloaded from the download page and the setAssetLocation method.

setAssetLocation

This method resets the location of all the Clientcide image assets to your specified path. The images by default come from CNET's servers but you'll want to change this to be your own. Not only will this allow you to author your own images but it will speed up the experience for your users. It's also possible that CNET will stop hosting them at some point.

Download the Assets

http://code.google.com/p/cnetjavascript/downloads/list

Setting A Location

When you download the assets, unzip them to a directory on your server, then, in your code, execute this method to point your code to that new location.

Clientcide.setAssetLocation("/path/to/your/copy")

preloadCss

A few of the plugins here ship with default CSS styling. When you invoke the plugin, the css is injected into the document (only once, unless you choose otherwise). If you wait until you need the css and inject it at the same time that you inject the document element into the body of the page, you sometimes get a flicker (especially if there's a background image). By preloading the css, you avoid this. This happens automatically on DomReady, so you shouldn't need to do anything.