forked from quirkey/sammy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DONT USE THIS ANYWHERE. Just to show that you _can_ have classic sintra style apps without much effort.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,53 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |||
|
|||
<title>Hello World</title> | |||
|
|||
<style type="text/css" media="screen"> | |||
|
|||
</style> | |||
|
|||
<script src="../../vendor/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> | |||
<script src="../../lib/sammy.js" type="text/javascript" charset="utf-8"></script> | |||
<script type="text/javascript" charset="utf-8"> | |||
;(function($) { | |||
// THE EXTEND HACK | |||
|
|||
var default_app = $.sammy(); | |||
$.extend(window, default_app); | |||
$(function() { | |||
default_app.run(); | |||
}); | |||
|
|||
})(jQuery); | |||
|
|||
;(function($) { | |||
|
|||
get('#/', function() { | |||
$('#main').text(''); | |||
}); | |||
|
|||
get('#/test', function() { | |||
$('#main').text('Hello World'); | |||
}); | |||
|
|||
})(jQuery); | |||
</script> | |||
|
|||
</head> | |||
|
|||
<body> | |||
<div id="container"> | |||
<div id="main"> | |||
</div> | |||
<ul id="link"> | |||
<li><a href="#/test">Click me!</a></li> | |||
<li><a href="#/">Back</a></li> | |||
</div> | |||
</div> | |||
</body> | |||
</html> |