javascript - Get links photos and insert another div? -


first, helping me. english not want people me. how grab photos of class="swiper-slide" insert class="tt1"?

ex:

<div class="tt1"></div>     <div class="tt11">...</div> <div class="tt2">     <div class="tt3">         <div class="swiper-slide">             <img src="/image1.jpg" style="width: 225px; height: 400px;">         </div>         <div class="swiper-slide">             <img src="/image2.jpg" style="width: 225px; height: 400px;">         </div>         <div class="swiper-slide">             <img src="/image3.jpg" style="width: 225px; height: 400px;">         </div>     </div> </div> 

result:

<div class="tt1">     <img src="/image1.jpg"> </div>     <div class="tt11">...</div> <div class="tt2">     <div class="tt3">         <div class="swiper-slide">             <img src="/image1.jpg" style="width: 225px; height: 400px;">         </div>         <div class="swiper-slide">             <img src="/image2.jpg" style="width: 225px; height: 400px;">         </div>         <div class="swiper-slide">             <img src="/image3.jpg" style="width: 225px; height: 400px;">         </div>     </div> </div> 

again thank helping me !

i'm not sure looking take look.

$(".swiper-slide").each(function(){    $(".tt1:eq(0)").append($(this).html());  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>  <div class="tt1"></div>      <div class="tt11">...</div>  <div class="tt2">  <div class="tt3">    <br><br>  /--- ss ---/  <div class="swiper-slide">  <img src="/image1.jpg" style="width: 225px; height: 400px;">  </div>  <div class="swiper-slide">  <img src="/image2.jpg" style="width: 225px; height: 400px;">  </div>  <div class="swiper-slide">  <img src="/image3.jpg" style="width: 225px; height: 400px;">  </div>  /--- ss ---/  </div>  </div>


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -