我正在尝试编写一个jQuery代码,它将“projects-content”类中的文本追加到“.projects-text”中(而不是附加“hello world”段落)
$(".projects-carousel .owl-nav").click(function(){
$('.projects-text').append('<p>Hello world</p>'
)
});
<div class="projects-Wrapper">
<div class="projects-content">
<h3> This header should append in projects-text div </h3>
<p>This is the text should append in projects-text div as well</p>
</div>
<div class="projects-img-wrapper">
<a class="popup-youtube" href="#"><img src="img/projects/1.png" alt="Jey The Dog"></a>
</div>
</div>
<div class="projects-text">
<!-- Here should a text from ".projects-content" append -->
</div>