Steps:
1. Install all the ASP.NET Ajax libraries. At the very least you will need the main Ajax install. If you want to use the js in the preview library (CTP), you should install it as well. These files should show up somewhere around here: C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0\Release
2. Create an html page.
3. Make a reference to the scripts.
4. Write whatever html you want to write that you would use the javascript code.
5. Write the javascript code.
You're done. Here is an example using the preview library code that I've posted about before. All you need to run this is this html and the javascript libraries previously mentioned. The first two lines in the function "hideThatDiv" use MicrosoftAjax.js. The rest use PreviewScript.js and PreviewGlitz.js. Note the complete lack of any ASP.NET code in this...
1: <html>
2: <head>
3: <script language="javascript" src="MicrosoftAjax.js"></script>
4: <script language="javascript" src="PreviewScript.js"></script>
5: <script language="javascript" src="PreviewGlitz.js"></script>
6: <script language="javascript">
7: function hideThatDiv()
8: {
9: var element = $get('targetDiv');
10: var target = new Sys.UI.Control(element);
11:
12: var fadeAnimation = new Sys.Preview.UI.Effects.FadeAnimation();
13: fadeAnimation.set_target(target);
14: fadeAnimation.set_duration(1);
15: fadeAnimation.set_fps(25);
16: fadeAnimation.set_effect(Sys.Preview.UI.Effects.FadeEffect.FadeOut);
17: fadeAnimation.play();
18: }
19: </script>
20: </head>
21: <body>
22: <div id="targetDiv" style="background-color: Black; width: 200px; height: 200px;">
23: </div>
24: <input type="button" onclick="hideThatDiv();" value="Hide the div" />
25: </body>
26: </html>
There is a lot more there than this, but this is a basic example of how to use some of the scripts.
