SVG Snap select a group by it's ID
<p>I'm trying to get an SVG Snap element by it's id. First I create a canvas:</p>

<pre><code> var s = Snap("#svgout"), //creates the canvas
</code></pre>

<p>Then I cerate a group:</p>

<pre><code>            var rect = s.rect(posx, posy, 40, 40, 6).attr({
                fill: "none",
                stroke: "#F44336",
                strokeWidth: 3,
            });

            var group = s.group(rect).attr({
                cursor: "move",
            });
</code></pre>

<p>and next I get the id of the group that is defaulted by SVG Snap</p>

<pre><code>var currGroupId = group.id;
</code></pre>

<p>Now, when I try to reference my group later in my code and get it by it's id,</p>

<pre><code>s.select(currGroupId);
</code></pre>

<p>I get null. How do I properly select an element by it's id?</p>