Each test
by Blake Gilchrist
HTML
<!-- Carc HTML - player hand (3 tile varient) -->
<div id="current_player_board">
<div id="handtile0" class="handtile" style="background-position: -100% 0%; opacity: 1; transform: scale(1); top: 0px; left: 45px; border-width: 3px;">Tile 0</div>
<div id="handtile1" class="handtile" style="background-position: -100% 0%; transform: scale(0.5); top: 28px; left: 130px; border-width: 0px; opacity: 1;">Tile 1</div>
<div id="handtile2" class="handtile" style="background-position: -100% 0%; transform: scale(0.5); top: -22px; left: 130px; border-width: 0px; opacity: 1;">Tile 2</div>
<br class="clear">
</div>
<!-- Carc HTML - player hand (normal) -->
<div id="current_player_board">
<div id="handtile3" class="handtile" style="background-position: 0% -300%; opacity: 1;">Tile 4</div>
<div id="handtile4" class="handtile" style="background-position: -100% 0%; display: none;">Tile 5</div>
<div id="handtile5" class="handtile" style="background-position: -100% 0%; display: none;">Tile 6</div>
<br class="clear">
</div>
<div id="page-content">
<div id="map_container">
<div class="partisan">Meeple</div>
<div class="tile_last3">Last tile</div>
</div>
</div>
<p>
Need to:
cycle through all handtile divs in #current_player_board
if no display:none detected, scaled rotation function
</p>
JavaScript
function colorBorderRed() {
$(this).css('border', '2px solid #ff0000');
}
function colorBorderBlue() {
$(this).css('border', '2px solid #ff0000');
}
$('#current_player_board div').every(function() {
if ($(this).css('display') == 'none') {
alert("Hidden div detected!");
colorBorderRed($(this));
}
else $(this).css('border', '2px solid #ff0000');
});