en-us/New-Webpage_and_JQuery.walkthru.help.txt

# New-WebPage can make it simple to work with Javascript libraries like jQuery.
# -UseJQuery will include the latest JQuery.
New-WebPage -UseJQuery -Title JQueryExample -PageBody @'
    <a href="http://jquery.com/">jQuery</a>
    <script>
        $(document).ready(function(){
            $("a").click(function(event){
            alert("As you can see, the link no longer took you to jquery.com");
            event.preventDefault();
        });
        });
    </script>
'@
 
# -UseJQueryUI will include JQueryUI.
# You can then use New-Region to automatically lay things out in tabs, accordians, and other controls.
New-Region -Layer @{
    "About Us" = "Here's Some Information About Us"
    "Contact Us" = "Visit our offices, or call our phone number"
} |
New-WebPage -UseJQueryUI -Title 'JQueryUI Example'
 
# The -JQueryUITheme parameter lets you change the JQueryUI theme. The default theme is Redmond
New-Region -Layer @{
    "About Us" = "Here's Some Information About Us"
    "Contact Us" = "Visit our offices, or call our phone number"
} |
New-WebPage -UseJQueryUI -JQueryUITheme -Title 'JQueryUI Theme Example'