Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Sammy</title>
- </head>
- <body>
- <div id="wrapper"></div>
- <a href="#/chat">Chat href</a>
- <a href="#/login">Login href</a>
- <script src="Scripts/libs/jquery-2.1.1.min.js"></script>
- <script src="Scripts/libs/sammy-0.7.4.js"></script>
- <script>
- var app = Sammy("wrapper", function () {
- this.get('#/login', function () {
- alert('login');
- $('#wrapper').html('Login');
- });
- this.get('#/chat', function () {
- $('#wrapper').html('Chat');
- });
- });
- app.run('#/login');
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement