tilemapCssClass: gQprefix + "tilemap",
var tilemapFragment = $("<div class='"+$.gameQuery.tilemapCssClass+"' style='position: absolute; display: block; overflow: hidden;' />");
var tileSet = tilemapFragment.clone().attr("id",name).css({
top: options.posy,
left: options.posx,
height: options.height*options.sizey,
width: options.width*options.sizex
});
tilemapFragment
here) would represent the inserted element. Then we change the properties of the newly cloned fragment to reflect the part of the tilemap that is not similar between all tilemaps. That's what the extract from line 1061 does.tilemapCssClass
is simply use to have one single place in the code where we specify the CSS classes used by gQ. This has two advantages:$.gameQuery
javascript namespace called $.gQ
. The old one remains in place!sprite
. $.gQ.spriteCssClass
. If for some reason I'll have to change the value of this in gQ's code the variable would remain the same and your code would work with the new version. It looks like you're new here. If you want to get involved, click one of these buttons!