2013-11-14 3 views
0
<div class="events"> 

<div class="single_event"> 

<div class="div1"> 
    <div class="moveMe"><img src="example.img" /></div> 
</div> 

<div class="div2"> 
    <!-- .moveMe targets here --> 
</div> 

</div><!-- end .single-event --> 


<div class="single_event"> 

<div class="div1"> 
    <div class="moveMe"><img src="example.img" /></div> 
</div> 

<div class="div2"> 
    <!-- .moveMe targets here --> 
</div> 

</div><!-- end .single-event --> 

</div><!-- end .events --> 

모든 .single_event 내의 각 .moveMe에 대해 전체 요소 (.moveMe)를 div2로 이동하려고합니다. 잠시 동안이 작업을 해왔고 지금은 작동하지 않습니다 ..jQuery div를 동일한 부모 내 다른 div로 이동

단서가 있습니까?

여기에 웹 사이트가 있습니다 : http://livefixtures.co.uk * 예고하고 있습니다. 작동 중이므로 이상하게 보일 수 있습니다.

.wd-event-channels을 .wd-event-content로 이동하려고합니다.

는 내가 jQuery를 함께이 시도 :

$('.wd-event-channels').appendTo(function(){ 
return $(this).parent().find('.wd-event-content'); 
}); 

두 번 부모를 실행함으로써, 내가 WD-이벤트 랩 수준에있어, 다음 i는 해당 대상 사업부 (.wd - 이벤트 내용)를 선택할 수 있습니다 . 중요한 것은 div가 동일한 wd 이벤트 내에서 이동된다는 것입니다.

+0

지금까지 jquery 코드를 게시하십시오. – mayabelle

+0

이미 시도한 것을 포함시킬 수 있습니까? 누가 알아. 당신이 생각하는 것보다 더 가까울지도 모릅니다. – rlemon

답변

0
$('.div2').append(function() { 
    return $(this).prev('.div1').find('.moveMe'); 
});