Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var sammyApp = $.sammy(function() {
  2.  
  3.   this.get('#/', function () {
  4.     clearRegLogin();
  5.   });
  6.  
  7.   this.get('#/register', function () {
  8.  
  9.     $.get(base_url + '/register', {}, function(html){
  10.         clearRegLogin();
  11.         $('#reg_login_form').html(html);
  12.     });
  13.  
  14.   });
  15.  
  16.   this.get('#/login', function () {
  17.  
  18.     $.get(base_url + '/login', {}, function(html){
  19.         clearRegLogin();
  20.         $('#reg_login_form').html(html);
  21.     });
  22.  
  23.   });
  24.  
  25. });
  26.  
  27. $(function () {
  28.     sammyApp.run('#/');
  29. });
  30.  
  31. function clearRegLogin() {
  32.     $("#reg_login_form").remove();
  33.     $('#content-change').prepend('<div id="reg_login_form"></div>');
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement