display_level builds a self-contained html part

This commit is contained in:
Gwenhael Le Moine 2011-07-06 23:08:41 +02:00
parent aad2f4a3e0
commit 9ff67413b5
2 changed files with 2 additions and 3 deletions

View file

@ -28,7 +28,6 @@
</header> </header>
<div id="main" role="main"> <div id="main" role="main">
<p id="blackboard"></p>
</div> </div>
<footer> <footer>
@ -50,7 +49,7 @@
<script src="js/star.js"></script> <script src="js/star.js"></script>
<script> <script>
state = load_level( levels, 0 ); state = load_level( levels, 0 );
start_loop( state, "#blackboard" ); start_loop( state, "#main" );
$( document ).focus(); $( document ).focus();
</script> </script>
</body> </body>

View file

@ -137,7 +137,7 @@ function load_level( levelset, nb ) {
} }
function display_level( state, elt ) { function display_level( state, elt ) {
$( elt ).html( format_level( state, false ) ); $( elt ).html( '<p id="blackboard">' + format_level( state, false ) + '</p>' );
} }