Can anyone please help me to work out how to achieve the following? I have a set of divs of unknown size. Each div has a class of .feature. I need to run a jQuery script to find all divs with .feature and then find all children as a series of pairs. Each pair will then be submitted to a further jQuery function.
For example:
1. <div.feature/>
2. <div.feature/>
3. <div.feature/>
4. <div.feature/>
5. <div.feature/>
The result should be that 1+2 and 3+4 get paired together such that I can then call another jQuery function on each of these individual sets.
I know that I can simply wrap each pair in an outer div and then find each wrapper divs children but I'd like to avoid changing the markup if possible.
Thanks in advance.