title: test group of element & apply same settings
body: <p>I'm trying to check properties for groups of divs and apply them style changes. I create groups by adding an attribute called "group" like this: </p>
  
  <pre><code>&lt;div id="div1" group="1"&gt;...&lt;/div&gt;
  &lt;div id="div2" group="1"&gt;...&lt;/div&gt;
  &lt;div id="div3"&gt;...&lt;/div&gt;
  </code></pre>
  
  <p>So div 1 and 2 belong to the same group.</p>
  
  <p>Now I would like to check if any div from group 1 has a position:fixed. What I'm currently doing is using .each to check if there is match.</p>
  
  <p>Question1: is there a better option to do this?</p>
  
  <pre><code>$("[group]").each(function()
  {
     if ($(this).css("position") === "fixed") 
        {
           myvar = 1;
        }
  });
  </code></pre>
  
  <p>With myvar = 1 I know that one element in the group has a fixed position. If I now wanted to apply a different style to each element of the group, how should I do it? If I have a lot of elements, going through all of them could become a performance issue no?</p>
  
  <p>Question2: how can I apply a style to all elements of my group? Again with each?</p>
  
  <p>Thanks
  Laurent</p>