1.1.1 • Published 6 years ago

uku-routejs v1.1.1

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Routjs is a simple route tool for single page application (anchor can work on it).

Demo http://routejs.tiger.mopaasapp.com/


How to use

Import routejs' library

<script src="src/js/uku-route.js"></script>

Define the route

var route = new RouteController("viewContainer")
.default("#page1","pages/page1.html")
.when("#page2","pages/page2.html")
.otherwise("pages/404.html")
.work();
<body>
    <div class="borderBox">
        <a href="#page1">go to page1</a>
        <a href="#page2">go to page2</a>
        <a href="#anchor">anchor</a>
        <div class="clear"></div>
    </div>       
    <div id="viewContainer">  
    </div>
    <a name="anchor">this is an anchor's href</a>
</body>

Then, enjoy it

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago