mirror of
https://github.com/gwenhael-le-moine/c-urs_-toil-s.git
synced 2024-12-26 09:58:48 +01:00
use jQuery() instead of $()
This commit is contained in:
parent
6e59e385ea
commit
245475656f
1 changed files with 11 additions and 11 deletions
|
@ -38,17 +38,17 @@ function initialize_a_star( dom_container, level_index ) {
|
|||
starhtml += '<canvas id="starboard" width="320" height="180"></canvas>';
|
||||
starhtml += '<aside id="infos"></aside>';
|
||||
starhtml += '</div>';
|
||||
$( dom_container ).html( starhtml );
|
||||
jQuery( dom_container ).html( starhtml );
|
||||
|
||||
// Now we can collect some informations about this DOM branch we have
|
||||
var DOM_infos = {
|
||||
container: dom_container,
|
||||
canvas: {
|
||||
//$() returns a jquery object, [0] to get the canvas itself
|
||||
context: $( dom_container + " #starboard" )[ 0 ].getContext( '2d' ),
|
||||
offset: $( dom_container + " #starboard" ).offset(),
|
||||
width: $( dom_container + " #starboard" ).width(),
|
||||
height: $( dom_container + " #starboard" ).height()
|
||||
//jQuery() returns a jquery object, [0] to get the canvas itself
|
||||
context: jQuery( dom_container + " #starboard" )[ 0 ].getContext( '2d' ),
|
||||
offset: jQuery( dom_container + " #starboard" ).offset(),
|
||||
width: jQuery( dom_container + " #starboard" ).width(),
|
||||
height: jQuery( dom_container + " #starboard" ).height()
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -166,7 +166,7 @@ function initialize_a_star( dom_container, level_index ) {
|
|||
infos += "<em>" + count_gifts( ) + "</em> gifts left<br />";
|
||||
infos += "<em>" + state.distance_travelled + "</em> meters travelled";
|
||||
|
||||
$( DOM_infos.container + " .gstar #infos" ).html( infos );
|
||||
jQuery( DOM_infos.container + " .gstar #infos" ).html( infos );
|
||||
}
|
||||
|
||||
function format_help( ) {
|
||||
|
@ -317,9 +317,9 @@ function initialize_a_star( dom_container, level_index ) {
|
|||
|
||||
|
||||
function start_loop( ) {
|
||||
$(document).focus( );
|
||||
$(document).click( event_handler );
|
||||
$(document).keydown( event_handler );
|
||||
jQuery(document).focus( );
|
||||
jQuery(document).click( event_handler );
|
||||
jQuery(document).keydown( event_handler );
|
||||
}
|
||||
|
||||
////// MAIN (so to speak) //////
|
||||
|
|
Loading…
Reference in a new issue