How do I detect using jquery if an element contains two elements of same class, and if so prepend some element before each?

This is an auto generated code from my site:

<div class="row mission-family-sugg">
	                  
        
         <div class="col-lg-4 col-sm-6 col-xs-12">
				<div class="event-blue-section">
				<div id="mainwrapper">
				<div class="date-img">
					<div class="dateImg"><span class="eday" style="">Sab</span><span class="edayN">26</span><span class="emonth">Set</span><span class="eyear">2015</span></div>					<div class="dateImg"><span class="eday">Mar</span><span class="edayN">29</span><span class="emonth">Set</span><span class="eyear_new">2015</span></div>	
				</div>
				<img src="https://www.missionfamily.org/image/cache/catalog/category-icons/eventi/corso-50x50.png" class="promo-event-1">
				<div id="box-6" class="box non-border">
					<img id="image-6" src="https://www.missionfamily.org/image/cache/catalog/events/belvedere/belvedere_01_l-270x269.jpg">
					<a href="https://www.missionfamily.org/fattoria-belvedere">
					<span class="caption scale-caption">
					<span>26-09-2015  15:00:00</span>
					<!--<span>15:00:00</span>-->
					<span>Via Belvedere, 40, Bellaria Igea-Marina, Italia</span>
					</span></a><div class="compare-list mar-top-30"><a href="https://www.missionfamily.org/fattoria-belvedere">
						</a><a style="color:#66B3F2;" href="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Via+Belvedere%2C+40%2C+Bellaria+Igea-Marina%2C+Italia&amp;ie=UTF8&amp;hq=&amp;hnear=Via+Belvedere%2C+40%2C+47814+Bellaria-Igea+Marina+RN%2C+Italy&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed" data-original-title="Vedi Ubicazione" data-toggle="tooltip" class="locationmap cboxElement"><i class="fa fa-map-marker"></i></a>
						<a data-original-title="condividi con social network" data-toggle="tooltip"><i class="fa fa-share-alt"></i></a></div>
					
					


				</div>
				</div>
				<h2 class="lineheight"><a style="color: #5db9d7 !important" href="https://www.missionfamily.org/fattoria-belvedere">Scuola di cucina alla Fattoria Belvedere</a></h2>
				<p> <a onclick="getGategoryLink(2)">Formazione</a></p>
				<p></p>
				</div>
			</div>
                        
        
         <div class="col-lg-4 col-sm-6 col-xs-12">
				<div class="event-blue-section">
				<div id="mainwrapper">
				<div class="date-img">
					<div class="dateImg"><span class="eday">Sab</span><span class="edayN">26</span><span class="emonth">Set</span><span class="eyear">2015</span></div>						
				</div>
				<img src="https://www.missionfamily.org/image/cache/catalog/category-icons/eventi/cultura-50x50.png" class="promo-event-1">
				<div id="box-6" class="box non-border">
					<img id="image-6" src="https://www.missionfamily.org/image/cache/catalog/giuliano_da_Rimini_700.1406106626-270x269.jpg">
					<a href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=27">
					<span class="caption scale-caption">
					<span>26-09-2015  16:00:00</span>
					<!--<span>16:00:00</span>-->
					<span>Via Luigi Tonini, 1, Rimini, Italia</span>
					</span></a><div class="compare-list mar-top-30"><a href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=27">
						</a><a style="color:#66B3F2;" href="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Via+Luigi+Tonini%2C+1%2C+Rimini%2C+Italia&amp;ie=UTF8&amp;hq=&amp;hnear=Via+Luigi+Tonini%2C+1%2C+47921+Rimini+RN%2C+Italy&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed" data-original-title="Vedi Ubicazione" data-toggle="tooltip" class="locationmap cboxElement"><i class="fa fa-map-marker"></i></a>
						<a data-original-title="condividi con social network" data-toggle="tooltip"><i class="fa fa-share-alt"></i></a></div>
					
					


				</div>
				</div>
				<h2 class="lineheight"><a style="color: #5db9d7 !important" href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=27">Alla ricerca del particolare, "caccia al tesoro" al Museo di Rimini</a></h2>
				<p> <a onclick="getGategoryLink(13)">Cultura</a></p>
				<p></p>
				</div>
			</div>
                        
        
         <div class="col-lg-4 col-sm-6 col-xs-12">
				<div class="event-blue-section">
				<div id="mainwrapper">
				<div class="date-img">
					<div class="dateImg"><span class="eday">Sab</span><span class="edayN">26</span><span class="emonth">Set</span><span class="eyear">2015</span></div>						
				</div>
				<img src="https://www.missionfamily.org/image/cache/catalog/category-icons/eventi/feste-50x50.png" class="promo-event-1">
				<div id="box-6" class="box non-border">
					<img id="image-6" src="https://www.missionfamily.org/image/cache/catalog/events/volontariato-270x269.jpg">
					<a href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=37">
					<span class="caption scale-caption">
					<span>26-09-2015  10:00:00</span>
					<!--<span>10:00:00</span>-->
					<span>Via Covignano, 238, Rimini, Italia</span>
					</span></a><div class="compare-list mar-top-30"><a href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=37">
						</a><a style="color:#66B3F2;" href="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Via+Covignano%2C+238%2C+Rimini%2C+Italia&amp;ie=UTF8&amp;hq=&amp;hnear=Via+Covignano%2C+238%2C+47923+Rimini+RN%2C+Italy&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed" data-original-title="Vedi Ubicazione" data-toggle="tooltip" class="locationmap cboxElement"><i class="fa fa-map-marker"></i></a>
						<a data-original-title="condividi con social network" data-toggle="tooltip"><i class="fa fa-share-alt"></i></a></div>
					
					


				</div>
				</div>
				<h2 class="lineheight"><a style="color: #5db9d7 !important" href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=37">Volontari per un giorno</a></h2>
				<p> <a onclick="getGategoryLink(12)">Feste</a></p>
				<p></p>
				</div>
			</div>
        		 <div class="clear-both"></div>
		                 
        
         <div class="col-lg-4 col-sm-6 col-xs-12">
				<div class="event-blue-section">
				<div id="mainwrapper">
				<div class="date-img">
					<div class="dateImg"><span class="eday">Ven</span><span class="edayN">2</span><span class="emonth">Ott</span><span class="eyear">2015</span></div>						
				</div>
				<img src="https://www.missionfamily.org/image/cache/catalog/category-icons/eventi/fiera-50x50.png" class="promo-event-1">
				<div id="box-6" class="box non-border">
					<img id="image-6" src="https://www.missionfamily.org/image/cache/catalog/events/falacosagiusta/falacosagiusta-270x269.jpg">
					<a href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=17">
					<span class="caption scale-caption">
					<span>02-10-2015  09:00:00</span>
					<!--<span>09:00:00</span>-->
					<span>Piazza Moncada, 1, Bastia Umbra, Italia</span>
					</span></a><div class="compare-list mar-top-30"><a href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=17">
						</a><a style="color:#66B3F2;" href="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Piazza+Moncada%2C+1%2C+Bastia+Umbra%2C+Italia&amp;ie=UTF8&amp;hq=&amp;hnear=Piazza+Moncada%2C+06083+Bastia+Umbra+PG%2C+Italy&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed" data-original-title="Vedi Ubicazione" data-toggle="tooltip" class="locationmap cboxElement"><i class="fa fa-map-marker"></i></a>
						<a data-original-title="condividi con social network" data-toggle="tooltip"><i class="fa fa-share-alt"></i></a></div>
					
					


				</div>
				</div>
				<h2 class="lineheight"><a style="color: #5db9d7 !important" href="https://www.missionfamily.org/index.php?route=product/event&amp;product_id=17">Fa' la cosa giusta!</a></h2>
				<p> <a onclick="getGategoryLink(10)">Fiere</a></p>
				<p></p>
				</div>
			</div>
                        
        
         <div class="col-lg-4 col-sm-6 col-xs-12">
				<div class="event-blue-section">
				<div id="mainwrapper">
				<div class="date-img">
					<div class="dateImg"><span class="eday">Sab</span><span class="edayN">3</span><span class="emonth">Ott</span><span class="eyear">2015</span></div>						
				</div>
				<img src="https://www.missionfamily.org/image/cache/catalog/category-icons/eventi/spettacoli-50x50.png" class="promo-event-1">
				<div id="box-6" class="box non-border">
					<img id="image-6" src="https://www.missionfamily.org/image/cache/catalog/events/armoniosamente/Armoniosamente-crescere-con-la-musica-2013-270x269.jpg">
					<a href="https://www.missionfamily.org/Armoniosamente-Sagra-malatestiana">
					<span class="caption scale-caption">
					<span>03-10-2015  15:30:00</span>
					<!--<span>15:30:00</span>-->
					<span>via Cairoli, 40, Rimini, Italia</span>
					</span></a><div class="compare-list mar-top-30"><a href="https://www.missionfamily.org/Armoniosamente-Sagra-malatestiana">
						</a><a style="color:#66B3F2;" href="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=via+Cairoli%2C+40%2C+Rimini%2C+Italia&amp;ie=UTF8&amp;hq=&amp;hnear=Via+Cairoli%2C+40%2C+47921+Rimini+RN%2C+Italy&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed" data-original-title="Vedi Ubicazione" data-toggle="tooltip" class="locationmap cboxElement"><i class="fa fa-map-marker"></i></a>
						<a data-original-title="condividi con social network" data-toggle="tooltip"><i class="fa fa-share-alt"></i></a></div>
					
					


				</div>
				</div>
				<h2 class="lineheight"><a style="color: #5db9d7 !important" href="https://www.missionfamily.org/Armoniosamente-Sagra-malatestiana">Armoniosamente</a></h2>
				<p> <a onclick="getGategoryLink(17)">Spettacoli</a></p>
				<p></p>
				</div>
			</div>
                		
      </div>

Open in new window



I need to run a for.each jquery function on all divs:
1. whose class is .date-Img
2. which contains exactly 2 sub elements with class .dateImg

If the element is found I need to prepend before each div.dateImg a <span class="qualifier">DA</span>

thanks in advance
badwolfffAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
Here's a jsfiddle that accomplishes what you are asking for.

http://jsfiddle.net/dn2w6x47/1/
Screenshot showing added <span> tags
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.