Skip to content
Snippets Groups Projects
test.html 1.31 KiB
Newer Older
<!DOCTYPE html>

<html>

    <head>
        <meta charset="utf-8">
        <title>SB test</title>
        <script src="td.js"></script>
        <script src="sb.js"></script>
        <script src="../tinyDOM-Sideburns.js"></script>
    </head>

    <body>
        <main id="content"></main>
        <aside id="othercontent"></aside>

        <script type="x-template/sideburns" data-name="list">
        <ul>
        [[* items ]]
            <li>[[item]]</li>
        [[/* items ]]
        </ul>
        </script>

        <script type="application/javascript">
        mu.ready(function(){
            mu("#content").render("list",
                                  {
                                    items: ["hello", "this", "is", "unordered", "list"]
                                  },
                                  {
                                    useHtml: true
                                  });
            mu("#othercontent").render("<ol>[[* items ]]<li>[[item]]</li>[[/* items ]]</ol>",
                                  {
                                    items: ["hello", "this", "is", "ordered", "list"]