I have a list of div that look like this below:
<div class="blockattribute" id="1" style="background-color: rgb(217, 217, 217); left: 0px; top: 0px;"></div>
I have a bunch of these on a grid and as part of my floodfill algorithm, I want to select adjacent grids by left
and top
as my x and y coordinates. So far I can't seem to figure out how to get this to work. Does anyone have a recommendation as to how to accomplish this?
From a stackoverflow question I have tried the following selector:
$("div['style=left: 0px; top:0px;']");
I think this is close but I get this error:
jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: div['style=left: 0px; top:0px;']